Tip 1 : Be thorough with your resume and projects
Tip 2 : Coding questions focussed more on Graphs
Tip 3 : Be very good with OOPS and aptitude
Tip 1 : Better to have end to end/ full stack projects on the resume
Tip 2 : Better to have a one page resume
The first round was conducted on Mettl platform in the evening and consisted of 3 sections:
First section was aptitude - This consisted of Medium to Hard level questions and we had time constraint for this section.
Second section was the debugging section - The questions were Easy to Medium level and we were given code snippets and had to changes to the code snippets to make the round running, identify the incorrect syntax.
Third section consisted of 3 coding questions - Easy to medium level questions which consisted of 60 minutes.



We create a hashmap which will store the key value pairs(key is the sum and value is the index in the array). So now we iterate through the array and calculate the sum one by one and update the hashmap. For eg. if the sum of first 3 elements is x, and the sum of first 7 element is also x, then this means that the sum from 3rd element to 7th element is 0. So we maintain a variable called maxlen(this contains the length of the array whose sum is 0), now compare the current length(7-3) with the maxlen and update the maxlen variable accordingly. maxlen = max(maxlen,current index-index in the hashmap) and finally return the maxlen variable.


If Typed = “aaabcc” and Expected = “abc”
Then, while trying to type “abc” one might long press ‘a’ and that would result in typing three consecutive a’s. This if followed by correctly pressing ‘b’ once and in the end he might long press ‘c’ resulting in typing it twice, the resulting text typed in this case is equal to “aaabcc” and therefore we will return “true”.



‘n = 3’, ‘m = 4’
‘edges = [ [0, 2, 8], [0, 1, 1], [1, 2, 0] ]’

The reachable nodes are highlighted in red color. So, the answer is ‘9’. Node ‘0’, itself included in the answer.
1. For an edge ‘[u, v, sz]’, if ‘sz = 0’, then there is no chain, and ‘(u, v)’ is an edge in the new graph.
2. The graph doesn’t contain parallel edges or self-loops.
This round was focussed on graphs and operating systems. For the coding questions they asked me to explain the approach and code it. OS questions were standard and straight forward.



Use zero-based indexing for the vertices.
The given graph doesn’t contain any self-loops.
The problem was to find the number of families or components in the graph. So I used the DFS approach for this. I maintain a variable called components and I start the DFS from vertex 0 and run DFS one by one. Whenever DFS stops then this means that it has explored all the vertices in the particular component so we increase the components variable by 1. So similarly run DFS for all the vertices and check the number of components, keep incrementing the components variable.
What are the different states of a process? How is multitasking done in real world scenarios?
Tip 1 : We need to have a good understanding of the different stages of a process.
Tip 2 : Do prepare all the standard questions of OS thoroughly. For eg. semaphores, mutex, multithreading etc.
Tip 3 : Practice all the answers for these standard questions before the interview.
Explain the difference between multiprocessing and multithreading?
Tip 1 : We need to have a good understanding of the different stages of a process.
Tip 2 : Do prepare all the standard questions of OS thoroughly. For eg. semaphores, mutex, multithreading etc.
Tip 3 : Practice all the answers for these standard questions before the interview.
This round consisted of an OOPS question, standard HR questions and a System Design question.
Explain about the diamond problem of OOPS?
Tip 1 : Be very thorough with OOPS concepts(stick to one language, I chose C++ and explore all the concepts)
Tip 2 : Not only concepts, but be prepared for coding the classes and functions as well
Tip 3 : Learn about the edge cases and exceptions
Design Flipkart Application. Explain the different sections, the flow of the website and the data structures used everywhere.
Tip 1 : Be prepared for the common questions of System Design such as Design Twitter, Parking Lot etc
Tip 2 : Don't skip System Design as LLD has become common even for SDE-1 interviews
Tip 3 : Not only theory, but we should but able to code our approach as well
Why should we hire you?
Why do you want to join the company?
What's your vision in the next 5 years?
Tip 1 : Be prepared for a good introduction
Tip 2 : Be confident about your resume
Tip 3 : Better to prepare for all the standard questions of HR

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?