Treebo Hotels interview question

stack and dynamic programming related problems