Codenation Interview Experience | Set 2 (On-Campus for Internship)
I applied for two month long summer internship in codenation. It was an On-campus internship recruitment.
It consisted of :
1. Coding Round: It had 3 questions to be done in 1:30 hrs,
- You’re given a string that (may) be appended with a number at last. You need to find whether the length of string excluding that number is equal to that number. For example : helloworld10 , answer is True as helloworld consist of 10 letters. Length of String less than 10,000. (All you need to do was check the last 5 places.)
- It was a simple dp with bitmasking question. N things to select for N people, you were given a NxN matrix and cost at each element, you needed to find the one combination with max total weight, such that each person gets exactly one thing.
- It was a Bi-partite graph implementation question. Just to check whether the graph is bi-partitie or not.It had a complex problem statement, but the problem eventually broke down to this.
2. Debug Round: It happened online on skype, where they asked us to share our screen so as to eliminate chances of cheating. We were given a code and we were told what it was meant to do, and we were asked to debug it with minimum changes possible, in minimum time. I got a simple iterative heap sort. I changed it to recursive heapsort, as took only 2 line changes for that, He asked me few questions about recursion and iteration, and asked me to memoize fibonacci, along with some questions on System stack and OS.
3.Interview Round 1 – It happened on Skype, he asked me about my projects, discussed the way, i thought over them, i implemented them, my approach, in short everything. Then he questioned different approaches i could have used instead of what i used. He gave me a question saying we had ‘k’ arrays each consisting of numbers and each of various lengths. We needed to find the shortest range such that the range includes atleast one number from each array. I proposed a O(n.k.log(max(length))) solution. He was satisfied with the answer.
4.Interview Round2 – It happened on Skype, he asked about my projects and work experience. He asked me to create a recursive function, for a tree question and then asked me to propose data structures and implementations for “Google Maps”. I proposed a graph of graph, with Dijkstra for finding the shortest paths. He later asked me about self-balancing trees,AVL and splay trees.
5.Interview Round3 – It happened on Skype, he asked me about my projects. Then he asked me to think of an approach for finding a lower bound for an array of structure having 3 integers,(lower bound for all 3 integers together). He asked me to query this in O(1) time and then subtract the integers and reinsert it in the structure. Later, then he asked me to think of some data structure with minimum memory and time complexity for a text editor. I suggested the rope data structure and then he asked me to think of something other than that. So i suggested a trie tree which had a vector at last to keep a track of first positions where this word should come. He was satisfied with my answer.
6.HR Round- This was not much of a round. She came on Skype asked me to check my mail, and there it was an offer letter waiting for me 🙂 !! All i could do was to turn speechless and smile 🙂
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.