← Dynamic Programming Quiz: all 8 questions
Dynamic Programming Quiz · Question 3 of 8
What is the maximum you can rob from houses [2, 7, 9, 3, 1] without robbing adjacent houses?
What is the maximum you can rob from houses [2, 7, 9, 3, 1] without robbing adjacent houses?
Answer & explanation
Correct answer: 12
Rob houses with 2, 9 and 1: 2 + 9 + 1 = 12.
Can you get the rest right without peeking?
Take the timed Dynamic Programming Quiz quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →