I applied for Snowflake Fall Co-op through a referral. I got the link for OA. Question in OA were mostly from DP(3 question time:90 minutes) varying form medium to hard level. After clearing my OA. I got call for technical interviews. I had the first interview this week.
The interviewer first talked about him and then asked about me and few projects and about the language I am proficient in. Then he gave me two technical question to write the code for :
DP[i,j] tells us whether its possible to have sum as j using the first i elements.
DP[i,j] = DP[i-1,j] || DP[i-1,j-arr[j-1]]
Hint: Interviewer was looking for solution with O(log n) time complexity.
I assumed the no. is present in CBT and found the path for the number in CBT.
for ex-> CBT given was
1
2 3
4 5 6 7
9
i had to find whether 12 is present or not. the path for it will be 1,3,6,12. i ran a loop till the no becomes 0 and store the value in stack.And based on the values in the stack i traversed the tree till the last level.
and then checked besed on the value whether the value is present in the tree. If its even check the left node and right.
the interview was mostly for an hour and it went well. I have next round in few days will update the question for it as well.
Do let me know the approach you would have taken for the above problems and any suggestions that would help me with the further interviews.
Thanks