Skip to content

Interview Experience 100

sggarg edited this page Nov 19, 2017 · 4 revisions

#2017

#AssociateSoftwareEngineer

Online Round -

  • Given n number of two times, find angular difference between the hands of the clock

  • Given an array of N elements and each element can be equivalent to 10^9. There will be k queries, each query will be an integer X in between 0 to N-1 (both inclusive). For each query, you have to return the product of all the elements of the array % M except the element at position X.

N <= 10^6

Ai <= 10^9

k <= 10^6

0 <= X < N

Example:

Array - 2 4 5 6

k=2

X=1

Output: 60 (2x5x6)

X = 0

Output: 120 (4x5x6)

##Round 1

  1. Given a lot of buildings with various heights, considering sun sets at extreme left how many building will be able to see sun set.

  2. Given n positive integers representing height of bars and the width of each bar is 1, calculate how much water it is able to trap after raining.

3)Given n unique numbers how many unique BST can be generated. (they wanted the recursive approach to calculate that not formula)

##Round 2

a) Many companies are visiting your campus and some of them are big giants, Why you want to join a startup.

b) Design a stack that returns min element in O(1) time.

c) Given a number in form of array of digits, find the just greater element from those digits. Then asked time complexity it was nlog(n) as i had used sort function in one part and then he asked whether it can be made o(n) (yes since there are only 9 digits we hash them).

d) Given a signal which was in sorted order but got distorted and each digit in the signal got displaced by at most k position left or right in the new signal. How to recover original signal in min space and time complexity.

##Round 3(HR)

a)Tell me about yourself hobbies, etc.

b)What were you used to do in childhood when you were not doing programming.

c)How did you start doing programming.

d)Did you wanted to join IIT and why? Why not institute like IIIT H over IITs?

e)Given a ship you are along with the 4 other guys, ship is drowning because of leak, you all want to reach the coast what you will do? (He wanted to just check the confidence in the answer because after answering he mentioned that).

f) Interests apart from programming

g) Most difficult non-programming problem solved.

TIP: Don't throw exact geeksforgeeks solution. Think and give a approach. They basically wanted how you are reaching to conclusion as they were always asking why this and how did you reach there.

Clone this wiki locally