Round 1 1. General Introduction about my projects i have done. 2. Problem Solving Largest Number but he gave integer array as input instead of strings 3. Problem Solving Minimum Flips Given three unsinged interger numbers, find minimum flips required in first two numbers to make OR of these two numbers equal to thrid number.
Example
Given [10, 15, 4]
1 0 1 0 - 10 1 1 1 1 - 15
0 1 0 0 - 4
minimum 5 flips are required to ensure 10 || 15 == 4; Solved these two problems and written the code.
Round 2
i. Given a string with multiple spaces, you are expected to print all the words vertically ignoring the spaces. Example Given string = "HOW ARE YOU" Expected output is HAY ORO WEU print a space if word runs out of characters Example Given string = "HEY HOWDY" Expected Output: HH EO YW _ D (space D) _ Y (space Y)
ii. Reverse Words in a String I have solved this question with extra space but in interview,interviewer is expecting me to solve in O(1) space :( Only hint he gave was think out of box. After some struggle, i got an idea, reverse entire string and now individually reverse each word ignoring spaces. After my approach he asked me to code, and after explaining the code he was fine and asked me to wait outside.
Round 3 This was one of the best round i had on this day, interviewer was USA guy and he was super cool.
Asked me behaviour questions, like how i handled failure and what i learnt, critical project handled and KPI's delivered in the project after that
He asked me to system design. I have asked him many questions, gathered the requirements from him, once i got the nod from him, started designing database, restAPIs, high level design, caching, cache eviction policy, fault tolerance etc.
SystemDesign Question : Design a system where you get huge data from the data points, and your system should save that data for analytics purpose.
Round 4 This was a typical managerial round, Manager asked me to solve suduko/chess problem, I have given standard backtracking solution. But he asked me to optimize it further for which i wasnt aware of solution. He has asked do i know Finite State Machines ? I said "NO".
Then he asked me to implement grep (Regular Expressions) I gave him a sample overview how it can be done but he felt im not good at this.
Finally he asked me to implement something i love to, Implement autosuggest feature. I have given him trie based solution and have written the code for the same.
Later asked few behavioural questions and enquired if i have any other offers with me. Mentioned i did well today and said he will recommend to HR.
Waiting for the HR reply !!!