Problem Description Given a directed graph. The task is to do Breadth First Traversal of this graph starting from 0. geeksforgeeks Solution class Solution { // Function to return Bread...
Coin Change
Problem Description You are given an integer array coins representing coins of different denominations and an integer amount representing a total amount of money. Return the fewest number of coin...
Palindromic Substrings
This question is part of NeetCode150 series. Problem Description Given a string s, return the longest palindromic substring in s. leetcode Solution This question is similar to: Longest Palindr...
Longest Palindromic Substring
This question is part of NeetCode150 series. Problem Description Given a string s, return the longest palindromic substring in s. leetcode Solution class Solution { //Time complexity: O(n...
House Robber I
This question is part of NeetCode150 series. Problem Description You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only co...
House Robber II
This question is part of NeetCode150 series. Problem Description You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed. All houses ...
Min Cost Climbing Stairs
This question is part of NeetCode150 series. Problem Description Given an integer array nums, return the length of the longest strictly increasYou are given an integer array cost where cost[i] is...
Flip Array
Problem Description Given an array of positive elements, you have to flip the sign of some of its elements such that the resultant sum of the elements of array should be minimum non-negative(as c...
Partition Equal Subset Sum
Problem Description Given a non-empty array nums containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in both subsets is equal. l...
Unbounded Knapsack
Problem Description Given weights and values of n items, put these items in a knapsack of capacity W to get the maximum total value in the knapsack. In other words, given two integer arrays val[0....