Open for CSE, MnC, ECE, EEE. (All Majors)
Online Coding Round. We were asked to do 5 coding problems on the HackerRank platform. Time duration: 90 mins.
Ques 1.) Medium: String problem which was similar to this https://www.interviewbit.com/problems/zigzag-string/. The problem was simple but the language was confusing. Many good coders were not even able to do the problem.
Ques 2.) Easy: Straight forward BFS problem. We just have to print the nodes in order of their distances from a given source.
Ques 3.) Medium: DP problem. The problem was the same as https://stackoverflow.com/questions/51619016/max-score-to-reach-end-of-array-with-step-length. N was given to be 100000 and 1<=k<=N. Constraints were difficult. Thinking O(N) or O(N log N) solution was difficult. But unfortunately, O(N*N) solution was also passing. So trying the naive approach is sometimes helpful.
Ques 4.) Medium: Same as the gas station one. https://www.geeksforgeeks.org/find-a-tour-that-visits-all-stations/. They just changed the language rest all was the same. The concept was the same.
Ques 5.) Tough: I haven’t got the time to see it much but it was looking similar to Max-Flow Problem in Graphs.
Time was a key problem and the language of the problem made it somewhat a little bit tougher.
I was able to do the first 4 problems correctly with all test cases passed and 3 test cases passed in 5th one.
I got selected for the Interviews. In total only 8 out of around 150 students were selected.
Interviews: They were on the hackerrank code pair platform.
Duration: 60 mins.
I was asked 3 problems purely based on coding only. No project discussion nor CS concepts.
Firstly, my interviewer asked me to introduce myself. Then, coding ques were as follows:
Ques 1.) It was based on a sliding window Technique. Given a positive integer array of n elements. We have to take some elements from the beginning and some from the end, no of the elements chosen in either beginning or end can be 0 also. In total K elements were to be chosen. We have to find the maximum sum among all windows.
Ques 2.) This was an easy problem related to trees. Path sum problem: https://www.geeksforgeeks.org/print-k-sum-paths-binary-tree/.
Ques 3) Given 2 lines, in total 4 pts were there with each having x,y coordinates. The lines were given and also the endpoints. Check whether the lines intersect or not?
One thing I want to say that they needed the most optimized approach only related to time as well as space, Start with the basic approach but then continue with your thought process. They told me to dry run the code also.
I was able to fully explain and code the first 2 ques, Was able to tell the approach in 3rd ques but can’t code at the time of the interview.
5 students got shortlisted for round 2. I was one of them.
Duration: 60 mins
My interviewer introduced himself and asked me do the same. He asked me just 1 coding DS problem. It was based on DP only.
You have to give him a schedule of a workout for the whole week. Given 3 exercises and calories burnt on each day. Given some constraints that if on one day you do max calories the one next day you can’t again choose maximum one and after that, you have to take rest on the next day that means no calorie burns. 2nd constraint I don’t remember.
I was able to code the value of max calorie burnt but finding the schedule took me a lot of time. We have to find exactly like do Exercise 2 on day1, Exercise 3 on day2, and so on.
He was here actually to find how I approach a problem. He just wanted to know how I think and the way to code the optimized approach.
Only 3 students were selected and I was fortunate enough to secure an internship at Myntra.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course. In case you are prepared, test your skills using TCS, Wipro, Amazon and Microsoft Test Serieses.