Tip 1 - Practice Atleast 250 Questions from geeks from geeks and coding ninjas
Tip 2 - Ex- Do atleast 2 good projects
Tip 1 : Have some projects on resume.
Tip 2 : Do not put false things on resume and be confident.
There were a total of 30 questions to be done in 45 minutes which were from different topics like SQL, C++ outputs, and basics. If you know the basics you can easily clear this round. 24 students were qualified for the next rounds. One coding question was a simple matrix question, Those who do the question with optimised approach were shortlisted for the next rounds. A total of 7 students was able to make it to the next round.
For given 2D array :
[ [ 1, 2, 3 ],
[ 4, 5, 6 ],
[ 7, 8, 9 ] ]
After 90 degree rotation in anti clockwise direction, it will become:
[ [ 3, 6, 9 ],
[ 2, 5, 8 ],
[ 1, 4, 7 ] ]
The rotation of a matrix involves two steps:
First, find the transpose of the given matrix.
Swap the elements of the first column with the last column (if the matrix is of 3*3). The second column remains the same.
The relative order of other elements should be maintained.
If Q = [ 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 ]
and ‘K’ = 4
then the output will be
Q = [ 40, 30, 20, 10, 50, 60, 70, 80, 90, 100]
The interviewer directly moved to data structure questions.
Delete an nth node from the end of the linked list. I gave him 2 pointer approaches, and he was satisfied and didn’t ask to code.
Implement 3 stacks in an array. I gave him an approach, and he dug into it to get all possible cases.
Check if a string contains a duplicate character. I gave him an approach through set STL then explained him solution with an array of size 256. He then asked me to give a solution without using any additional array. I was unable to answer it.
Given a stream of integers, you have to find a maximum of 4 elements at any point in time. I gave him the maxheap approach first then corrected it by giving the minheap approach, He then asked me to do it without the use of any STL or inbuilt function, I gave him another approach by using 4 variables he was satisfied, then he asked me time and space complexities of all the solutions and comparison between them.
insert(word) - To insert a string "word" in Trie
search(word) - To check if string "word" is present in Trie or not.
startsWith(word) - To check if there is any string in the Trie that starts with the given prefix string "word".
Type 1: To insert a string "word" in Trie.
1 word
Type 2: To check if the string "word" is present in Trie or not.
2 word
Type 3: To check if there is any string in the Trie that starts with the given prefix string "word".
3 word
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
Which SQL keyword removes duplicate records from a result set?