Facebook New Grad 2020 店面

第一题 https://leetcode.com/problems/integer-to-english-words/ 变种 only had to do it for 0-999.
第二题 implement a class that can (1) accept an integer and (2) query the median of all the integers that have been accepted.
Example:
c.add(1)
c.add(2)
c.add(3)
c.median() >2
The interview wants O(n) time for add funciton and O(1) time for median function https://leetcode.com/problems/find-median-from-data-stream/
剩下5分钟

1 Like