Attempting coding challenges on GeeksforGeeks has more than one benefit! Just redeemed my hard earned Geek Bits to get myself a new-tshirt. Over to you! practice.geeksforgeeks.org/p…
16
#geekstreak2024 #DeutscheBank
approach - store both tree in 2 lists and merge using merge sort.
22
#geekstreak2024 #DeutscheBank
A simple approach is reverse second half of list and compare using 2 pointer .
1
8
#geekstreak2024 #DeutscheBank
Intuition : use the given array as some kind of mapping to check whether an element occur before or not
Keep track of missing no as sum of all no can be maxi. missing no . every time we find a no. just subtract from missing as it is not missing
2
28
#geekstreak2024 #DeutscheBank
A simple approach is we can use HashMap to store new node we created corresponding to old nodes that will help in putting values of random pointer .
9
#geekstreak2024 #DeutscheBank
Approach :: keep in mind that if array is sorted then consecutive elemnts me +k and -k would give us the candidate which can be answer.
Keep track of minimum and maximum while increasing/decreasing by k and update answer .
17
#geekstreak2024 #DeutscheBank
Intuition :: between 2 invalid index there is valid parenthesis .
Handle corner cases from start to first invlid index and last invalid index to last index of string .
9



















