- http://stackoverflow.com/questions/29236837/find-max-sum-of-elements-in-an-array-with-twist
- https://www.geeksforgeeks.org/dynamic-programming-set-12-longest-palindromic-subsequence/
- https://www.geeksforgeeks.org/given-an-array-of-numbers-arrange-the-numbers-to-form-the-biggest-number/
I gave 3 technical interviews. Most of the questions were easy. Some questions were based on my internship.
No HR interview.
Here are a couple of questions from the interview that I remember:
- Find the second minimum element in an array? It can easily be done by using 2n comparisons but they asked me to reduce the number of comparisons. It can be done in (n+logn) comparisons. (n/2 + n/4 + n/8 +…..) = n comparisons to find the minimum element in the array (divide and conquer approach) ,logn comparisons to find the second minimum.
- You are given a k-ary tree. Each node can have less than or equal to k children. Store the tree in an array such that you can create the tree back from the array. Just like a binary tree where the children are 2*i+1 & 2*i+2, here the children will be k*i+1, k*i+2,…,k*i+k. I was asked to write a working code for all the questions they asked.
Revise all data structures and algorithms. Also, whatever you write in your resume, be thorough with it. 🙂
If you like neveropen and would like to contribute, you can also write an article and mail your article to review-team@geeksforgeeks.org. See your article appearing on the neveropen main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above
Ready to dive in? Explore our Free Demo Content and join our DSA course, trusted by over 100,000 neveropen!