Snowflake Interview Experience
Anonymous User
1852

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 :

  1. You are given a vector which consists of positive numbers. your task is to tell whether the array can be divided into two parts such that both the parts has equal sum.
    Hint: I used DP to answer the question.
    i calculated the sum and if the sum was odd returned false else used DP to whether we can have sum equal to half the sum we calculated using the elements of vector.

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]]

  1. given a CBT(Complete binary tree) filled in BFS order and a number. Your task is to find whether the number is present in CBT.

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

Comments (2)