Meta interview question

1. sub array sum 2. heap based que