Soal
00:00

24. House Robber

SedangPemrograman dinamisAmazonGoogle

Return the maximum amount that can be robbed without choosing two adjacent houses.

Contoh 1:

Input: nums = [1,2,3,1]
Output: 4

Contoh 2:

Input: nums = [2,7,9,3,1]
Output: 12

Batasan:

  • 0 <= nums.length <= 100
Mode kode inti
● Tersimpan otomatisBaris 1, kolom 1