Tip 1 : Have the fundamental knowledge of OS, CN and DBMS concepts.
For OS: Memory(caching, memory hierarchy, etc), synchronization(semaphores, threads, etc)
For DBMS: Normalization and SQL Queries(especially join and sub-queries).
Tip 2 : Practice writing code in C, C++ or Java(some interviewers don't prefer Python).
Tip 3 : Practice the questions of some basic data structures and algorithms:
Data structures: Arrays, Binary Tree, Hashmap, Linked list were asked during my interviews.
Algorithms: Sorting, Dynamic programming(medium level), DFS and BFS, Pattern printing(* patterns).
Tip 4 : The technical interview 2 was mostly around logical thinking and projects, so prepare some standard riddles and
brain teasers. Having some good projects is also a great advantage because you'll just have to explain the steps
you did and will also help you during the HR round.
Tip 1 : A simple resume will work but it should contain only the topics/skills that you have a good knowledge of else it
might cause a bad impression.
Tip 2 : In the HR round, I was asked the project I did from my resume(because it had an eye-catching name), so have
some interesting projects on your resume as well.
It was a 60 minutes coding round with 3 problems of different topics. It took place on hackerearth so the environment was good and the time was also enough for the questions. Two of the problems were standard but the first problem was ambiguous(we had to print a pattern but just one test case was given so in the end I had to hit and try different approaches for the same).




Step 1 : In the first try it looked like fibonacci numbers, so wrote a code to print first i fibonacci starting from 1 in
each ith row. It didn't work and passed only 1 case.
Step 2 : Tried using a similar approach but this time printed first n primes including 1, and this passed all test
cases.



str = "ababc"
The longest palindromic substring of "ababc" is "aba", since "aba" is a palindrome and it is the longest substring of length 3 which is a palindrome.
There is another palindromic substring of length 3 is "bab". Since starting index of "aba" is less than "bab", so "aba" is the answer.
I used the similar dynamic programming approach.



Used hashmap approach
It was a one hour interview. It included several topics from ranging from DBMS , Data structures, OOPS and Riddles.


A
BC
CDE
DEFG
It was a basic implementation problem in which I just had to print the alphabets in sequence with i alphabets in each ith row.



In the given linked list, there is a cycle, hence we return true.

I knew the approach to this one so I just coded it up using slow and fast pointer approach.
In 3 cuts, What is the maximum number of pieces we can cut a cake into?
Tip 1 : Six was the most obvious wrong answer so I gave it another thought and provided 2 approaches for the answer which was eight.
1. Make 2 diameter cuts and then slice the cake from the middle(curved surface).
2. Cut the cake in half and after each cut stack the pieces overlapping on top of each other then make another cut.
Write an SQL procedure for kth maximum salary in a table.
I was not able to answer this one.
It was also an hour long round and was mostly focused around behavioral questions, riddles and projects.
What would you do/ How will you react if you've not received your salary since the last two months?
I just said that instead of taking this aggressively, I'll discuss the potential cause and solution of the problem with my manager.
You want to send a secret message to your friend Alex in the mail.
But Sam, who you don't trust, has access to all your mail.
So you put your message in a box with a lock.
But you can't send a key, because Sam could use or copy it!
How can you get your message through securely?
Tip 1 : Initially I had no thought how to solve this one but I did think out loud of whatever was coming to my
mind at that time. Got a hint from the interviewer after a while - what if we can send the box multiple
times?
After that tip, the solution instantly clicked.
There is a lightbulb inside a closet. The door is closed, and you cannot see if the light is on or off through the door. However, you know the light is off to start.
Outside of the closet, there are three light switches.
One of the door light switches controls the lightbulb in the closet. You can flip the switches however you want, but once you open the door, you can no longer touch the switches.
How do you figure out without a doubt which of the three light switches controls the light?
I knew the solution to this so I just told the solution to the interviewer.
I was asked questions about my projects:
At last, In the same call. I received the offer and the compensation structure was discussed.
Just stay calm and reply honestly to the questions asked

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
Which SQL clause is used to specify the conditions in a query?