Tip 1 : Be Strong with DSA
Tip 2 : Be Strong with OOPS and Core CS Fundamentals
Tip 1 : One page Resume
Tip 2 : Highlight your coding profiles
Online Assessment round


Subsequences of string "abc" are: ""(empty string), a, b, c, ab, bc, ac, abc.



'S' = "{}()".
There is always an opening brace before a closing brace i.e. '{' before '}', '(' before ').
So the 'S' is Balanced.
DSA Problem Solving round



If ‘ARR’ is {1,2,3,4} and ‘K’ = 4, then there exists 2 subsets with sum = 4. These are {1,3} and {4}. Hence, return true.
Approach: A simple approach is to solve this problem by generating all the possible subsets and then checking whether the subset has the required sum. This approach will have exponential time complexity. However, for smaller values of X and array elements, this problem can be solved using dynamic programming.
Let’s look at the recurrence relation first.
This method is valid for all the integers.
dp[i][C] = dp[i – 1][C – arr[i]] + dp[i – 1][C]
Let’s understand the states of the DP now. Here, dp[i][C] stores the number of subsets of the sub-array arr[i…N-1] such that their sum is equal to C.
Thus, the recurrence is very trivial as there are only two choices i.e. either consider the ith element in the subset or don’t.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?