Tip 1 : I would suggest practicing as many questions on data structures and algorithms as you can because it is the question practice that would help you in building your concepts strong. I practiced a lot of questions on InterviewBit and completed all modules of data structures and algorithms because there you can find the recent interview questions that you should know.
Tip 2 : If you have time for your interviews, I would recommend going through Leetcode as it has a good variety of questions sorted on topic wise difficulty level where you can try to solve at least 20-30 questions for each data structure and algorithm. Moreover, you should regularly participate in the weekly contests happening there so that you could know about your weak areas to improve.
Tip 3 : Along with coding you should be clear about some basic concepts of Operating systems and Databases that would help in your interviews. One more thing is that do some good research about the company's goal and vision and be prepared to ask some company-related queries that show your interest in the company.
Tip 1 : Your Resume should consist of mainly skills, projects, and achievements. Projects would play a crucial part in your interview and you should have at least one most relevant and good project that shows how strong your concepts are in development.
Tip 2 : The most important tip is that never lie on your resume and like If you have worked upon some technology for the project part only and don't know the proper depth you could write basics only in your resume.
The round consisted of 3 coding questions, and the test was conducted on the Mettl platform. There was no sectional time limit for the coding questions. Every student randomly got three coding questions and got different sets of questions. The test was online with audio and video both on for continuous monitoring.
[2,3,4] - median is 3.
[2,3] - median is floor((2+3)/2) = 2.
The mean was easy to compute, calculating the sum of the entire array, then I sorted the array for median and checked the size of the array. If the size was odd, I returned the middle element; else, I returned the average of the two middle elements. I maintained a frequency array for mode and returned the lowest element with maximum frequency.
I used the setprecision() method to round off the nth gp number.
As the answer can be large, return your answer modulo 10^9 + 7.
Can you solve this using not more than O(S) extra space?
I used DP to solve this problem, with the Number of dice being directly used as the row index and the sum being the column index. In the end, I returned the last element of the DP table.
This round was based on data structures and some discussion regarding the projects. The interviewer was very calm and listened very carefully to the solutions. There was a lot of discussion on my projects, and the interviewer was very interested in knowing about the workflows of my projects.
For the trees given below:-
The given trees are identical as:-
1. The number of nodes in both trees is the same.
2. The number of edges in both trees is the same.
3. The data for root for both the trees is the same i.e 5.
4. The data of root -> left (root’s left child) for both the trees is the same i.e 2.
5. The data of root -> right (root’s right child) for both the trees is the same i.e 3.
6. The data of root -> right -> left ( left child of root’s right child) for both the trees is the same i.e 6.
7. Nodes with data 2 and 6 are the leaf nodes for both the binary trees.
I solved the question with simple recursion by checking every node and calling the left and right subtree.
Then, the interviewer asked me to optimize.
I explained to him then that if we have to check their identity, we must traverse both trees fully.
He was satisfied with the explanation.
For the given string “deed” :
The possible subsequences are {“”}, {“d”}, {“e”}, {“de”}, {“e”}, {“de”}, {“ee”}, {“dee”}, {“d”}, {“dd”}, {“ed”}, {“ded”}, {“ed”}, {“ded”}, {“eed”} and {“deed”}.
As, {“d”}, {“e”}, {“de”}, {“ed”} and {“ded”} are repeated.
The distinct subsequences are {“”}, {“d”}, {“e”}, {“de”}, {“ee”}, {“dee”}, {“dd”}, {“ed”}, {“ded”}, {“eed”} and {“deed”}
Thus, the output will be 11.
As the answer can be large, return your answer modulo 10^9 + 7.
I solved this question using recursion and map. I made two recursion calls, one for including the element and one for excluding the element, and then after reaching the end of the array, I pushed the subsequence to the resultant vector. I also checked for duplicates using the map.
The interviewer was satisfied with this approach after I explained the workflow to him and that since we want all the subsequences, we need to use recursion.
This was an HR/Coding round and was the final one. The coding question was to find the nth node from the end of the linked list, similar to the one asked in the previous round. The interview started with 2-3 HR questions. After I answered all of them, I seriously discussed my projects, like why you chose this project, what its advantages are, and how it solved the existing problem. I answered all the project-related queries very calmly, and he was satisfied.
What do you expect from this internship program?
Where do you see yourself shortly?
What are your weaknesses?
What do you know about the company and the work culture here?
Tip 1: I answered the first question like this: I expect constant learning and growth from this internship and want to contribute something to improving people's standards in the technical world. You should always be clear about your goal and how it would help the company, and you grow as an engineer.
Tip 2: For the second question, I answered this by breaking the intervals and telling my exact plan that for the first 2-3 years, I want to become such an expert in my field that If there is any problem related to that in the company, I would be the first person to be approached and in later years, I want to explore the field of being a manager whose work is to advise on to how to lead any real-time project.
Tip 3: For the weaknesses, the tip is that one should always tell their weaknesses, but that should also not be the case when you start telling a lot of your weaknesses. You should tell only 1-2 weaknesses that are too irrelevant to the job description so that your weakness also seems to be your strength to the interviewer.
Tip 4: Do a thorough research of the company and ask some relevant questions if given a chance, which gives a good impression of yours. Also, have an in-depth knowledge of your project because that would be asked in almost every round.
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
Which type of comments is used to comment on single lines of Java code?