Tip 1 : Do lot of hard work and practice of Data Structures and Algorithms based questions.
Tip 2 : I personally recommend you Coding Ninjas and Geeks For Geeks for interview preparation.
Tip 1 : Make your resume short and try to make it of one page only.
Tip 2 : Do mention all your skills which you are confident of in your resume.
This is purely online coding test . gave us a 3 coding questions. I only remember 1.



Example: String "aabbbcdcdcd" will be encrypted as "a2b3cd3".
Input string will always be lowercase characters without any spaces.
If the count of a substring is 1 then also it will be followed by Integer '1'.
Example: "aabcdee" will be Encrypted as "a2bcd1e2"
This means it's guaranteed that each substring is followed by some Integer.
Also, the frequency of encrypted substring can be of more than one digit. For example, in "ab12c3", ab is repeated 12 times. No leading 0 is present in the frequency of substring.
The frequency of a repeated substring can also be in parts.
Example: "aaaabbbb" can also have "a2a2b3b1" as Encrypted String.
I simply decrypt the string by reading substring and their frequency and append current substring to the decrypted string and after the end of traversal of given string our answer will be kth element of the decrypted string.
This is First purely technical round based on data Structures and Algorithms



arr[i] = -arr[j] and i != j
Given array/list can contain duplicate elements and will not contain '0'.
(arr[i],arr[j]) and (arr[j],arr[i]) are considered same.
I asked for some clarifications whether I should print all distinct x‘s or if I should print an x if a pair of +x and -x is encountered. The first approach I told was to use a map and I was keeping a flag for +x and -x if it’s found once. Later he asked me to print all pairs, so I stored the frequencies of all the elements in the map and iterated through the negative elements and for each element x , I would print x min(count[-x],count[+x]) times. He said he can’t afford that much space and he wanted me to optimise space further. So I told him a 2 pointer approach where I sort the array once and then keep two pointers to the start and end. I would move the start pointer forward if the sum is less than 0 and I’ll move the end pointer backward if the sum is greater than 0.
This is Again Back to back technical Round based purely on Data Structures



A sequence 'A' is a subsequence of a sequence 'B' if 'A' can be obtained from 'B' by deletion of several (possibly, zero) elements. For example, [3,1] is a subsequence of [3,2,1] and [4,3,1], but not a subsequence of [1,3,3,7] and [3,10,4].
I initially tried a 2D DP solution where dp[i][j] indicates the length of the longest sequence with ending at i containing j as a digit. It’s a N X 10 DP matrix. The interviewer asked me why I needed a 2D DP solution and I struggled to convince him. I wrote the code for it. It wasn’t completely correct. I was missing something. After thinking for a while I narrowed down to a solution containing only 10 elements dp[0], dp[1], dp[2].. dp[9] which is updated every time I see a new number. I take a number, I go through all digits in the number and find value = 1 + max(dp[d] for all digits d in the number). Set this value to dp[d] for all digits in the number.
This is final round based on technical and HR



Try to solve the problem in 'Single Scan'. ' Single Scan' refers to iterating over the array/list just once or to put it in other words, you will be visiting each element in the array/list just once.
I solved this question using three-pointers and this problem was a variation of dutch national flag problem. The interviewer was satisfied by my approach as this was the most optimal approach.

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?