Tip 1 : Prepare thoroughly deeply but never forget to revise. It's absolutely crucial.
Tip 2 : Don't fear interviewers. Always keep this mindset that they are there to recruit you not reject you.
Tip 3 : Do give regular contests to keep your time stress habit in check.
Tip 1 : Keep resume till one page.
Tip 2 : Have multiple projects/internships. Something to talk about during interviews. This give positive reflection about your work experience to the interviewer.
Tip 3 : Highlight your work in terms of quantitative values. Numbers are highly valuable on a resume.
Tip 4 : Keep resume format simple, clean and clutter free.
Tip 5 : Never lie on your resume. Interviewer will definitely catch that if you are trying to do the same.
The online test was in the morning. It consisted of just two coding questions to be solved in an hour. One was easy, one was hard.



I gave a brute force solution. My interviewer was very friendly he helped me here and there if they were any errors in my code. Overall I was able to solve both the questions in under 50 minutes. Later we had a casual discussion on projects and work culture at SAP for a few minutes.



1. He always presses the button which has a digit written on it, i.e., he never presses the ‘*’ and ‘#’ button.
2. Once he presses a button, the next button he presses should either be the same button or the button which is adjacent to the previous button.
3. In starting he can press any button except ‘*’ and ‘#’.

N = 1 is trivial case, number of possible numbers would be 10 (0, 1, 2, 3, …., 9)
For N > 1, we need to start from some button, then move to any of the four direction (up, left, right or down) which takes to a valid button (should not go to *, #). Keep doing this until N length number is obtained (depth first traversal).
It was a video call interview taken over MS Teams. Interviewer was fairly friendly. I gave all answers in terms of pseudo code.
There is a room with a door (closed) and three light bulbs. Outside the room, there are three switches, connected to the bulbs. You may manipulate the switches as you wish, but once you open the door you can’t change them. Identify each switch with its bulb. All bulbs are in working condition.
Tip 1 : Think quick since puzzles are mostly easy
Tip 2 : Great way to kickstart an interview given that puzzles are easy



1. ‘.’ matches to any single character.
2. ‘*’ matches to zero or more of the preceding element.
1. You have to match the entire string with the pattern given.
2. Both the strings, 'S' and 'P' contain only lower-case alphabets.
3. Only the pattern will contain additional characters ‘*’ and ‘.’ along with alphabets.
Step 1, If p.charAt(j) == s.charAt(i) : dp[i][j] = dp[i-1][j-1];
Step 2, If p.charAt(j) == '.' : dp[i][j] = dp[i-1][j-1];
Step 3, If p.charAt(j) == '*':
here are two sub conditions:
1 if p.charAt(j-1) != s.charAt(i) : dp[i][j] = dp[i][j-2] //in this case, a* only counts as empty
2 if p.charAt(i-1) == s.charAt(i) or p.charAt(i-1) == '.':
dp[i][j] = dp[i-1][j] //in this case, a* counts as multiple a
or dp[i][j] = dp[i][j-1] // in this case, a* counts as single a
or dp[i][j] = dp[i][j-2] // in this case, a* counts as empty



We cannot use the element at a given index twice.
Try to do this problem in O(N) time complexity.
The basic idea is to maintain a hash table for each element num in nums, using num as key and its index (0-based) as value. For each num, search for target - num in the hash table. If it is found and is not the same element as num, then we are done.
It was taken by a senior manager. Mostly there were HR questions and then discussions on my resume. It was an amazing round. The manager was extremely friendly and helpful. What keeps you motivated?. Are you a team player?
This was purely an HR round and she discussed questions from my resume. I explained all my internships and projects from start to beginning.
What are your hobbies?

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?