Tip 1 : Practice at least 300 coding questions.
Tip 2 : Also focus on your aptitude quantitative.
Tip 3 : Do some good projects.
Tip 1 : Don't write anything on your resume which is not correct.
Tip 2 : Mention some good projects on your resume.
-> The test had 5 sections and the duration is 2 hours 15 minutes. All sections are mandatory.
-> The Coding section had 2 programming questions and the duration was 30 mins.
-> The CS multiple-choice section had 7 MCQs and the duration was 25 mins.
-> The Problem Solving multiple-choice section had 8 MCQs and duration was 20 mins.
-> Each MCQ earns you 5 marks for the correct answers and -2 for incorrect answers.
-> The Advanced section had 1 programming question and the duration was 45 mins.
-> The Subjective section had 2 questions and the duration was 15 mins.
Keep in mind that reordering is to be done according to the indexes and not the node values.
Also, ensure that the relative order inside both the even and odd groups should remain as it was in the input.
Input: 'head' -> 1 -> 3 -> 5 -> 7
Output: 'head' -> 1 -> 5 -> 3 -> 7
Explanation:
The nodes with odd indices (1, 5) are grouped together, followed by the nodes with even indices (3, 7).
• The left subtree of a node contains only nodes with data less than the node’s data.
• The right subtree of a node contains only nodes with data greater than the node’s data.
• Both the left and right subtrees must also be binary search trees.
'P' = 1, 'Q' = 3
tree = 2 1 4 -1 -1 3 -1 -1 -1,
The BST corresponding will be-
Here, we can clearly see that LCA of node 1 and node 3 is 2.
Let S = “abdd” and X = “bd”.
The windows in S which contain all the characters in X are: 'abdd', 'abd', 'bdd', 'bd'.
Out of these, the smallest substring in S which contains all the characters present in X is 'bd'.
All the other substring have a length larger than 'bd'.
This was a technical interview. The interviewer was very helpful and he gave me hints for a solution. He asked me 2 coding questions. Some others questions were:
Explain deadlock
Explain what is Hashmap and linked list. Why we use them? And where do we use them?
Why we prefer linked list over array?
What are the time complexity of various operations in both data Hashmap and linked list?
What do I like about GS more and why do I want to be the part of GS.
A -> 1
B -> 2
C -> 3
...
Z -> 26
AA -> 27
AB -> 28
...
One coding question medium level.
The second was a puzzle. I wasn’t familiar with this puzzle at that time. So interviewer saw all my thinking processes.
puzzle was:
We have two water jugs, one measures 4 Gallons (4G) while the other measure 9 Gallons (9G). But there is no measuring label mentioned on either of these two jugs i.e. we cannot know the exact amount filled in the jug. Now, assuming there is an infinite amount of water supply, can we measure all 1G, 2G, 3G…….. upto 9G using these unmarked jugs.
Hint: We can empty the jugs, and transfer water from one jug to other.
Then the interviewer asked about my project like what is the concept of the project, technologies used, etc.
for the given 5 intervals - [1,4], [3,5], [6,8], [10,12], [8,9].
Since intervals [1,4] and [3,5] overlap with each other, we will merge them into a single interval as [1,5].
Similarly [6,8] and [8,9] overlaps, we merge them into [6,9].
Interval [10,12] does not overlap with any interval.
Final List after merging overlapping intervals: [1,5], [6,9], [10,12]
The latest version of C++
What is the difference between C++ and C++17?
Name some new features that are introduced in C++17
What are cloud computing and cloud credits?
Benefits of using cloud computing
Why you want to be a part of GS
Give some project idea that can be used in COVID-19
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you write a single-line comment in C++?