Tip 1 : Being consistent is the key. Practice DSA questions daily and revised core concepts weekly
Tip 2 : I personally recommend you Coding Ninjas and Geeks For Geeks for interview preparation.
Tip 3 : Be an active user of job platforms and started appearing in mock or real interviews for confidence without thinking about the level of your preparation
Tip 1 : Make a one-page resume and add skills in which you are confident
Tip 2 : Mention at least two good projects and links to coding platforms
Tip 3 : Must read interview experiences before any interview
This was the DSA round. The interviewer asked 3 questions which are of medium level and asked upto optimal solution
Input:
Step 1 : Figure out how the tree will look after traversal and got the point that I have to do something like vertical order traversal
Step 2 : I do a level order traversal so that the topmost node at a horizontal node is visited before any other node of the same horizontal distance below it.
Step 3 : Hashing is used to check whether a node at a given horizontal distance is seen.
Step 1 : Initially I read the problem and start thinking about two pointer approach
Step 2 : But after a few minutes I got to the point where I can treat balls as numbers (i.e 0, 1, 2) then I remembered the DNF algorithm
Step 3 : So I took three-pointers i.e low, high, and mid, and write code keeping in mind I save to store red -> white -> blue and applied DNF algo
A graph problem-
Given N X N matrix filled with 1, 0, 2, 3. Find whether there is a path possible from source to destination, traversing through blank cells only. You can traverse up, down, right, and left.
A value of cell 1 means Source.
A value of cell 2 means Destination.
A value of cell 3 means a Blank cell.
A value of cell 0 means Blank Wall.
Step 1 : He just asked for an approach to this question so I told him like that
Consider each cell as a node and each boundary between any two adjacent cells be an edge. so the total number of Nodes is N * N. So the idea is to do a breadth-first search from the starting cell till the ending cell is found.
Step 2 : Then he asked for time complexity
It was a complete Database Round.
Asked for 2-3 SQL Queries
Query 1: Related to join of tables
Query 2: Normalize the Resultant table of Query 1 and asked for some theoretical questions regardings Normalization, Acid Properties, etc.
Tip 1 : Practice SQL queries
Tip 2 : Grasp theoretical concepts also
Asked for Schema Design of LinkedIn
Tip 1 : Practice the design of the schema
Tip 2 : Well understanding of the keys in schema
Asked for almost everything that I mentioned in my resume
1)Create a function for a single rotation
2)Take care of some edge cases
3)Simply make the value of k smaller: to avoid the repeated effect of rotation (k=k%n)
4)Since the function singleRotate() will rotate the list one time only so to rotate it k times call the function under a while loop which will be operated k-times
5)Return the head of the list
Schema Design for Instagram post
Asked about web development theoretical concepts some remembered questions like ----
Q1: You have given n no. of articles and you have to change the color of the title in an alternate fashion in CSS
Q2: What happens when we hit google.com in browser?
Tip 1 : Well revised your skills and made some projects hands-on
Tip 2 : Read the standard interview question
Sir please I have interested to speak with you regarding the interview preparation so please reply me