Tip 1 : Be consistent in the preparation. Practice atleast one question everyday
Tip 2 : Make relevant notes that you can go through on the day before the interview
Tip 3 :Try to note your progress by giving timed contests
Tip 1 : Clearly mention the details of the projects that are relevant to the company that you are applying for
Tip 2 : Ensure that there are no grammatical mistakes and that you have highlighted the important keywords in your resume
It was a telephonic interview at 10 in the morning. Interviewer seemed cool.
1. If the value is present in the array, return its index.
2. If the value is absent, determine the index where it would be inserted in the array while maintaining the sorted order.
3. The given array has distinct integers.
4. The given array may be empty.
Input: arr = [1, 2, 4, 7], m = 6
Output: 3
Explanation: If the given array 'arr' is: [1, 2, 4, 7] and m = 6. We insert m = 6 in the array and get 'arr' as: [1, 2, 4, 6, 7]. The position of 6 is 3 (according to 0-based indexing)
The interview was in the morning at 10 AM in the office meeting room.
Given 2 arrays - frontend and backend tasks . each number in these array represents the complexity needed to run the task.There is a server that has to run these tasks., the server is supposed to run one frontend and one backend task together only at a timeThe aim is to have lowest complexity server- (complexity of server needed = frontend task complexity + backend task complexity) such that all the tasks can get paired . We have to return the set of pairs.constraints-each pair has to have one backend task and one frontend task one task can be mentioned in one pair only mention time complexity and space complexity
Sort both arrays and start from one end of first and opposite end from second.and make pairs
I was trying to find the pairs as well as updating the max complexity needed but that approach was failing as it needed backtracking to correctly assign all the possible pairs.
The interviewer gave me a hint to solve it in parts-
First calculate the lowest complexity that the server can have(by using the same method mentioned above) and then calculating the pairs
It is possible for Mr. X to rob the same amount of money by looting two different sets of houses. Just print the maximum possible robbed amount, irrespective of sets of houses robbed.
(i) Given the input array arr[] = {2, 3, 2} the output will be 3 because Mr X cannot rob house 1 (money = 2) and then rob house 3 (money = 2), because they are adjacent houses. So, he’ll rob only house 2 (money = 3)
(ii) Given the input array arr[] = {1, 2, 3, 1} the output will be 4 because Mr X rob house 1 (money = 1) and then rob house 3 (money = 3).
(iii) Given the input array arr[] = {0} the output will be 0 because Mr. X has got nothing to rob.
Didn't get enough time to code the solution but explained the approach
We can do this using DP
We can maintain 2 arrays - one represents the ans if we start from first house and the other represents the answer if we start. from the second house.Then simply looping over the array and calculating these array's elements.
The interview was at 11 AM in the meeting office.
Started with the brute force solution of insertion sort
Interviewer asked to optimize.
Gave the solution which uses two heaps - max heap and min heap. the difference in size of both heaps cannot be more than 1. And we might need to remove elements from one heap to other heap as more input numbers are added
The interview was at 1 AM.
Was asked to design a notification service for website like Facebook.
Whenever someone liked our post or commented on our post
Tip 1: Asked a lot of questions to get clarity on the requirement
Tip 2: Keep in mind how to modularize the various components in the design
Tip 3: Mention the assumptions that you are taking
The meeting was at 2 PM in the office meeting room.
There were a lot of questions, related to my resume, past experience, the technologies i had worked on. And then there were questions regarding the technologies and tech stack that they work on as the interviewer was trying to find whether my experience matches the requirements of the job
Questions related to frontend technologies like polymer, react.
Questions from C++ and databases were also asked.
Tip 1: Be truthful. Don't try to fake things you don't know about.
10 AM
Deeper discussion about all the projects i did in the past company.
Tip 1: Know well about the projects that you have done in the past
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you select an element by class name in CSS?