KARAN CHHABRA
KARAN CHHABRA
We have a string of characters that can either be '(' or '{' or '[' or ')' or '}' or ']', and we have to tell whether the given set...
Your task is to count the number of ways to construct sum n by throwing a dice one or more times. Each throw produces an outcome between 1 and 6....
You are given an integer n. On each step, you may subtract one of the digits from the number. How many steps are required to make the number equal to...
Consider a money system consisting of n coins. Each coin has a positive integer value. Your task is to produce a sum of money x using the available coins in...
Question You are 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. Note that...
Given nodes and edges of a graph, find number of connected components in the graph
given the edges of tree, we have to find the diameter (longest distance between any 2 edges) of the tree