Skip to content

Latest commit

 

History

History
5 lines (3 loc) · 295 Bytes

README.md

File metadata and controls

5 lines (3 loc) · 295 Bytes

Idea

This problem is very similiar to House Robber, such that we can not choose both of the first item and the last item.

The idea is to iterate the array two times, once we eliminate the first item, the other time we eliminate the lst item.