A DP hard question with a few tweaks, which might've made it a medium question at best
Developer Intern Interview Questions
5,259 developer intern interview questions shared by candidates
Rod cutting do problem .
There was not a really difficult question. The first question was based on design classes. And the second one was on checking whether a binary tree is a binary search tree. One question per round. I screwed up the second question.. so did not get the offer.
No difficult questions, really. Tricky in a way maybe, if you miss a detail, but if you are alert, you will sail through.
Java questions
The questions were something on the lines of, - Given a tree, output levelwise nodes (Ans: It was actually the BFS algorithm, but I didn't realize it at that time) - Find first unique substring (In O(n)) (Ans: Use counting sort variant) - Convert an array into balanced binary search tree (Ans: First sort the array, then use recursive algorithm after splitting the array at mid, and using the mid as a node) - From two arrays N and M find the combinations that add up to say X (Ans: I was drained by the time second interview started, so the only answer I came up with was of O(n2) complexity i.e. using two FOR loops)
Using a object-oriented programming language, design a class of a train and its compartments.
2D grid dp to find the shortest path
Previous internship experience in detail
The main questions they asked are what sorting algorithms do you know and how do they work. And what are the main principles of OOP.
Viewing 1421 - 1430 interview questions