Tip 1 : Practice atleast(easy and medium questions from leetcode under(Top Interview Questions)) and all the questions from Gfg under(must to do coding questions for interviews))
Tip 2 : Don't learn each and every question you solved but try to solve question in a way that you can solve its variation during interviews
Tip 3 : Do one project(one is enough) which you can explain with full technical details (why you used this technology, and all logics you applied in implementation)
Tip 4: Atleast read the round 1 (Coding round) Archives from (Geeks for geeks or Glassdoor). To get your mind prepared for the types of questions that company usually asks.(Coding round is the toughest Step in the whole Process to clear)
Tip 1: Have at least one project which you have made yourself and you should know all the technical questions related to that project (I feel project domain hardly matters like web development or android or ML/AI)
Tip 2: You should Put only those skills in resume :
1. Which the company requires (eg if you know company doesn't require Networking domain knowledge so
don't include it unnecessary if you are not much confident in it)
2. For on campus internships resume shortlisting is very easy so don't add anything unnecessary which might
cause you pain during interview.
3 coding Questions:
1st : Easy question based on simple loop iteration
2nd :Medium level Dp question
3rd : Medium level tree question(where we were not just required to complete the tree function but to build whole bst from
scratch)
It was conducted from 1:30 - 3:00 pm.
The coding platform was very good (as auto indentation and auto completion of brackets were there)
having camera on.
The exact statement was something of story type so i just remember the crux of that story:there was a kid who hears story from someone by paying him some money for every story and the storyteller tells him a extra story for every X amount of stories that the child can remember. Now its given that the child remembers the story once he hears that and don't forget it .Given : Initial amount child has X, cost of each Story Y(same for all stories), minimum stories he has to remember for a free story Z. We need to find the maximum stories that the child can hear.
It was a easy question:
First take a sum variable(to store final answer) and initialize it with 0.
Take a temp and store X/Y in it and add it to sum then apply a loop and check:
if temp < Z return the sum
else add temp/Z to sum and update temp to temp/Z and continue the process.
You may make as many transactions as you want but can not have more than one transaction at a time i.e, if you have the stock, you need to sell it first, and then only you can buy it again.
First I found that this can easily be done using the brute force approach of taking a hashmap for storing all the numbers (from min value in the input range to the maximum value in the input range )with their frequency of appearance. then I will again run a loop for each query range and output the values which will be greater than k.
in this solution 50% of the test cases gives TLE.
Then I realized that I need not to run the loop for each and every range rather I should take a array of 100000 size and :
first mark the start and end of each range in one loop
then fill the frequencies for the between elements by just looping from min to max value in my range
then for each query I got my answer in constant time by subtracting the frequency of the range elements from frequency array.
For the given binary tree: [1, 2, 3, -1, -1, 4, 5, -1, -1, -1, -1]
Start Node: 3
1
/ \
2 3
/ \
4 5
Output: 2
Explanation :
In the zeroth minute, Node 3 will start to burn.
After one minute, Nodes (1, 4, 5) that are adjacent to 3 will burn completely.
After two minutes, the only remaining Node 2 will be burnt and there will be no nodes remaining in the binary tree.
So, the whole tree will burn in 2 minutes.
After thinking for some time I got that he wants me to find the diameter of BST because diameter will be the longest path for fire to travel.
I already solved the diameter problem earlier so it doesn't took me me much time to solve it.
This was a completely technical coding round where I was asked to solve the problems of data structures.
The codepad where i was asked to code was fine,
The interviewer was very friendly and was helpful and understanding.
I also asked him about his work and experience in the company and some other questions.
Down: (row+1,col)
Down left diagonal: (row+1,col-1)
Down right diagonal: (row+1, col+1)
First I just told him the most brute force approach of finding every possible path for every element of matrix then choose the maximum among those path and then store that max path in some other 2D matrix. He then discussed the time complexity of the solution
then I told him where the repetitions were occurring in this approach and then then I directly told him the best solution for this problem by using DP and starting from last element of mXn matrix
It was held on Gmeet platform
The interviewer was very experienced person and was very nice too.
He made me comfortable by first introducing himself in a very detailed way and then asking me mine introduction
Since I feel that his internet connection was not very good so he turned off his camera but I decided not to turn off mine as in online interviews your face reviles your confidence
the interviewer mostly asked me questions about my interests in technical field and the project that I have done
He asked me about my project.
Why did you choose NoSQL database rather than SQL database?
Tell me about your current project, which you are working on.
What attracts you the most in this technical domain or world (where I answered AI and the bigdata).
Tip 1: The HR person is generally a very high experienced person so never tell him anything false just to impress him.
Tip 2: Try to include only that things in your introduction where you want to drive your discussion further
Tip 3: Try to show some interest in your growth and the work that they are offering you and in what sense they can help
you build your skills better.
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
Suppose list1 is [2, 133, 12, 12], what is max(list1) in Python?