HashedIn by Deloitte interview question

Dp, linked lists, graphs and oops