My Profile - 5 years of experience from India and Abu dhabi , pursuing Masters in Software Engineering from ASU. I have good amount of experience in Distributed services, Kafka, zookeeper. I feel confident in speaking about LP questions. Good Experiences with both SQL and NoSQL DB's.
Status: Experienced Software Engineer and pursuing Master's in Software Engineering at ASU
Location: CA
Date: Feb 17, 2022
Round1 15 minutes intro call with HR
Result: PASSED
Round2 45 min call with Hiring manager - Asking about resume, Work experience.
Result: PASSED
Round3 Final Onsite rounds consist of 3.5 hours of round.
Question - Data Merging
Part 1a: Given 2 data arrays (size P and size Q) with sorted values, how do you get a merged sorted array?
Part 1b: What’s the space and runtime complexity?
Part 2a: Give X data arrays (with total element size Y) with sorted values, how do you get a merged sorted array?
Part 2b: What’s the space and runtime complexity? ```Possible answer to this question:
1. using merge sort - (this is what i did in the interview)
2. Using priorirty queue, by comparing first element of all the arrays and append the lowest one to priority queue
the one element which is lower, move it's index pointer to next position. (let me know if anyone need code for this one, i can add it up here). this is optimized approach which I came after discussion with interviewee.
3. Hints: Always prefer to discuss solution before coding with interview as there is a possibility he might suggest and adhered to high optimized solution then what you are already thinking and you can save some timing by coding an unwanted solution. ```Result: I could finish O(n) time complexity.
Question: There is a list of companies name given with stock value. For example [("AA", 10), ("AAPL", 160), ("AMD", 115), ("AMZN", 2900), ("ABNB", 2900)]
you have to return all the stocks which starts with given string given by user. For example: findAllStockWithAA(AA)
Output - AA, AAPLE ```Solution: As you all have guessed it correctly the most effecient solution to do this is to build trie.
Using trie data structure.
Result: I could finish O(n) time complexity.
A valid string is any assortment of alphanumeric characters with parentheses balanced
( comes before )
each ( needs a )
s = ")))a("
"a"
s = "((()"
"()"
s = "c(ry(pt(o)"
"crypt(o)" or "c(rypto)" or "cry(pto)" ```
Solution
* Use stack to store the parenthesis and validate the parenthesis and iterate the strings. (Let me know if you want me to share the code)Result: I could finish O(n) time complexity.
Input-
L0 -> L1 -> ... -> Ln-1 -> Ln
Output -
L0 -> Ln -> L1 -> Ln-1 -> ...
Input -
Before: L0 -> L1 -> L2 -> L3 -> L4 -> L5
Output -
After: L0 -> L5 -> L1 -> L4 -> L2 -> L3
Input -
Before: L0 -> L1 -> L2
output -
After L0 -> l2-> l1
Before: L0 -> L1
After L0 -> l1Result: Couldn't finish this code in O(1) space and O(n) time complexity.
Overall Result - Rejected.