interview questions facebook/google

This commit is contained in:
Vahagn Khachatryan
2021-03-26 19:35:59 +00:00
parent 539e4b0077
commit 29dca37612
4 changed files with 469 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
# Facebook Interview Questions
## Coding Interview 1
### Problem 1
Given alphabet [c b a]
sort the array in alphabetical order
[[a b b][a b c][c][b]] -> [[c][b][a b c][a b b]]
### Problem 2
Given a tree, calculate sum of all path sums
```
4
/ \
9 0
/ \
5 1
```
495+491+40
This one I remember vaguely.
## Coding Interview 2
### Problem 1
How many unbalance parentheses are the in a given string.
e.g. )(())(() -> 2
### Problem 2
Given m sorted arrays, return k-th element from joined sorted array.