Maintain as high as cgpa possible.
Focus on DSA instead of development.
Tip 1 : Have coding platforms ranks.
Tip 2 : Mention all the competitions you have won.
Timing - afternoon
Environment - Online



1. Any left parenthesis '(' must have a corresponding right parenthesis ')'.
2. Any right parenthesis ')' must have a corresponding left parenthesis '('.
3. Left parenthesis '(' must go before the corresponding right parenthesis ')'.
4. '*' could be treated as a single right parenthesis ')' or a single left parenthesis '(' or an empty string.
5. An empty string is also valid.
Tip 1: Used simple O(n) logic.
Tip 2: Use constraints to determine the time complexity, thus the algorithm.



Input: 'n' = 3, 'k' = 2 and 'arr' = {1, 2, 3}
Output: 2
Explanation: The maximum possible minimum distance will be 2 when 2 cows are placed at positions {1, 3}. Here distance between cows is 2.
Tip 1: Used the gives constraints to determine the O(logn) time complexity, thus started thinking binary search
Timing - Around 10 am
Environment - Online



If the given sequence ‘ARR’ has ‘N’ elements then the sorted wave array looks like -
‘ARR[0] >= ARR[1]’ and ‘ARR[1] <= ARR[2]’
‘ARR[2] >= ARR[3]’ and ‘ARR[3] <= ARR[4]’
‘ARR[4] >= ARR[5]’ and ‘ARR[5] <= ARR[6]’ And so on.
1. ‘ARR[0]’ must be greater than or equal to ‘ARR[1]’.
2. There can be multiple arrays that look like a wave array but you have to return only one.
3. We have an internal function that will check your solution and return 'True' in case your array is one of the solutions otherwise return 'False'.
The given array ‘ ARR = { 4, 3, 5, 2, 3, 1, 2 } ’
The below figure is a visual representation of the given ‘ARR’ and you can see we can express ‘ARR’ in a waveform array because
4>3 and 3<5
5>2 and 2<3
3>1 and 1<2
And it follows the condition of wave array.

Try to solve this problem in linear time complexity.
Dont remember the algo, but it was simple based on modifying some sorting algo only.
Timings - 12 noon



A subsequence of an array/list is obtained by deleting some number of elements (can be zero) from the array/list, leaving the remaining elements in their original order.
Simple DP O(n)

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?