Skip to content

Interview Experience 1 (Intern)

sggarg edited this page Aug 13, 2017 · 1 revision

Round 1 :- Online Round

Consisted of 20 MCQs related to Algorithms, data structures, general maths problems, OS and DBMS questions and 2 coding questions.

Round 2:- First offline Tech round :-

I was first asked to tell about my favourite subjects in CS. I was also asked a few basic Java questions related to input and output and scanner classes. Then my interviewer asked me about 4 coding questions. the first one was to replace the first node with the kth node in a linked list and then the k+1th node with the 2k th node. not only the values but the entire node had to be replaced. The second question was to print the level order traversal of a binary tree. The third question was a slight modification of the above problem i terms of the traversal, (The interviewer gave his own traversal technique) and also the problem had to be encompassed for n-ary tree The fourth question was Suppose you have an array with infinite numbers, which is sorted and there may be duplicates. Find the occurrence of a number.

Round 2 and Round 3

I was asked one question in each of the round. and They were held together at the same time but different people took my interview. The first question was Amazon wants to implement a new backup system, in which files are stored into data tapes. This new system must follow the following 2 rules:

  1. Never place more than two files on the same tape.

  2. Files cannot be split across multiple tapes.

It's guaranteed that all tapes have the same size and that they will always be able to store the largest file.

Every time this process is executed, we already know the size of each file, and the capacity of the tapes. Having that in mind, we want to design a system that is able to count how many tapes will be required to store the backup in the most efficient way.

The parameter of your function will be a structure that will contain the file sizes and the capacity of the tapes. You must return the minimum amount of tapes required to store the files. Example: Input: Tape Size = 100; Files: 70, 10, 20 Output: 2

The second questions was :- An array of size 365 is provided to you which has the price of one particular Amazon product for an entire year. The price which is mentioned is both the selling and buying price of the product on that day. For example if arr[5] =100 , that means on the 6th of january, if the product is bought, it will be bought at 100Rs and if it is sold , it will be sold for 100Rs So now , find the day you should buy the product and the day you should sell the same product, such that the profit is maximum. Provide the most optimized solution.

And then we had a general discussion on ACM-ICPC and how it is beneficial. :P Best of luck to all and I hope this helps

Clone this wiki locally