Google interview question

Data structures and algorithms along with unit tests for the same

Interview Answer

Anonymous

13 May 2021

I answered the brute force approach to both the questions first and then gave optimal solutions