Mckinsey SDE - 2 interview experience
Summary
I applied through LinkedIn and was called for an SDE-2 interview at Mckinsey. The first round consisted of two DSA problems, one of which I partially solved and the other I was unable to solve, leading to rejection.
Full Experience
Got a call from HR after applying through LinkedIn in couple of days.
I was informed that there will be 4 round of interview.
On first round, I was given 2 DSA problems.
- Find whether the BST is valid or not but tricky part here is that input won't be a BST. It will be preorder sequence of a BST as list. - Partially solved
- Find the minimum amount spent to purchase products. we will get array of prices of products and no of coupons as second argument which a integer. Formula to apply coupon is price//2 ** coupon - we have to use maxheap here but I forgot the implementation. unbale to solve.
Verdict - Rejected
Interview Questions (2)
Validate BST from Preorder Sequence
Find whether the BST is valid or not but tricky part here is that input won't be a BST. It will be preorder sequence of a BST as list.
Minimum Cost with Coupons using MaxHeap
Find the minimum amount spent to purchase products. we will get array of prices of products and no of coupons as second argument which a integer. Formula to apply coupon is price//2 ** coupon - we have to use maxheap here but I forgot the implementation. unbale to solve.