Two Pointer, Sort colours array, hashmap with prefix sum
Anonymous
I answered the approach and the brute force solution. Gave her the approach on optimized solution. But not able to code. I was asked 3 questions.
Check out your Company Bowl for anonymous work chats.