Rakuten interview question

Coding questions on heaps, arrays, sorting