Position: Member of tehcnical staffPosition: Member of tehcnical staff
Experience: 1.5 years
Location: Bangalore, India
1st Telephonic:
- Construct a complete binary tree from given array in level order fashion
https://www.geeksforgeeks.org/construct-complete-binary-tree-given-array/
- Questions about threading module in python & classes, objects in python
2nd Onsite:
- Rearrange positive and negative numbers with constant extra space
https://www.geeksforgeeks.org/rearrange-positive-and-negative-numbers/
( Solved in O(n*2) but interviewer was expecting O(nlogn) solution with using any extra space)
- given two arrays , [['a','b'],['c','d']] = [ 2.0, 3.0 ]
which means: a/b = 2.0 & c/d = 3.0,
you will be given the above mentioned two arrays of same size & you will be asked about 10^6 queries like ['a','d']: calculate a/d
( Interviewer was expecting query to be solved in O(1), can be solved by making some precomputations)
- Given an sorted array with duplicate elements, find index of first occurence of query elemnt x.
(Implement lower bound using binary search)
3rd Onsite:
- Construct a Binary Tree from Postorder and Inorder
https://www.geeksforgeeks.org/construct-a-binary-tree-from-postorder-and-inorder/
( wrote complete working code along with explanation)
- Minimum deletions required to make frequency of each letter unique
https://www.geeksforgeeks.org/minimum-deletions-required-to-make-frequency-of-each-letter-unique/
- Minimum number of bracket reversals needed to make an expression balanced
https://www.geeksforgeeks.org/minimum-number-of-bracket-reversals-needed-to-make-an-expression-balanced-set-2/
(Solved without using any extra space)
- Number of subarrays having sum less than or equal to K where both k & array is positive.
solved in O(nlogn) by taking a commulative sum array & binary search & extended the solution for negative k & array numbers by using bit(binary indexed tree) && shifting the values of bit to right to accomodate negative values in bit.
Similar question (https://www.geeksforgeeks.org/number-subarrays-sum-less-k/)
4th Onsite:
- Given an array, print the array using two threads where first thread will print even indexed elements while the second thread will print even indexed elements
- Given a very large file which contains integers & can not be populated in memory because of large size, sort this file with optimal use of resources,
focus was on minimising the number of disk access.
(Discussed a solution of sorting in merge sort fashion & while creating the sorted array from two lists use batching instead of loading every thing inside the
memory)
- High level design discussion of views count feature of youtube, (discussion about distributed servers & distributed cache, load balancing & consistent
hashing)
5th Onsite Managerial:
- Discussion about handling threads inside a server using ThreadPoolExecutor & maintaing states for the incoming requests & using the resources optimally.
- Some behavorial & past experiences discussions.