Skip to content

Interview Experience 94 (Intern)

sggarg edited this page Oct 16, 2017 · 1 revision

#2017

##PlatformEngineerIntern

Online round:

There were 3 questions. To qualify you need to solve at least two of them. Time limit: 90 minutes.

First question was based on dijkstra algorithm.

Second was a 2-D grid greedy problem.

Third was a data structure problem with given function prototype.

I solved the first and third problem and qualified for online skype interviews.

1st skype interview:

Interviewer was bit strict. He asked two questions and I was asked to answer and code both of them correctly.

This round lasted for more than an hour.

Ques 1: You are given a string of length n (n<=10^6). The string consists of open and closing braces '(' and ')'. You need to output the number of sub-sequences in that string which represent balanced parenthesis.

Example:

n=5

(()))

Answer: 9

Ques 2: You are given two positive integers N and M. (N, M<=10^6). These two integers represent a 2-D matrix whose row count is N and column count is M. The elements filled in the matrix in the following fashion:

Row 1: 1, 2, 3, 4....M

Row 2: 2, 4, 6, 8,...2*M

Row N: N, 2N, 3N, 4N....N*M

Note : You cannot make this matrix as N,M values are very high. You have to work out without matrix with only the two integers N and M.

Now the question is, given N & M you need to find the Kth number after I convert the whole 2-D matrix into a 1-D array and then sort it.

Example:

N=2 M=4 K=4

1 2 3 4

2 4 6 8

After converting to 1-D and sorting: 1 2 2 3 4 4 6 8

Answer=3 (4th number)

I solved both of the questions and qualified for next round.

2nd Skype interview:

This was easier than the previous round (I felt so). This round lasted for approx. 45 minutes.

He asked me only one question and asked me to code it.

You are given N cities and M roads. Each road is assigned some cost. Each day you travel from city 1 to some city K, where 1<K<=N and return back to city 1. You need to calculate how many of to visiting all N cities is possible if you always take the minimum cost path to visit some city modulo 1000000007.

Two ways are considered different if there is at least 1 city whose path is different from the other. (N, M<=10^5)

I solved this and qualified for the next round.

Final Skype interview:

This was a managerial round. This round lasted for 30 minutes.

First of all he asked me about my projects. I didn't have any projects and this created a negative impact.

Then he asked me about Threading/Multi-threading.

Then he asked me some database questions.

At last he asked me this question - You have apache log file from where you have to pull data and display top 1000 results from last 30 mins with best time and space complexity. Log file is stored in the server and server size is huge. You don't have that much space.

This round didn't go well.

Result: Rejected.

Clone this wiki locally