Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

House Robber

You a robber planning to rob houses along a street. Each house has a certain amount of money stashed. If two adjacent houses are robbed, police will be called. Given a list of non-negative integers representing the amount of money of each house, determine the maximum amount of money you can rob tonight without alerting the police.

Solutions:

Swift

O(n)

C++

O(n)

Installation

Run make to build and run Swift files. Or you can run .playground file.