Skip to content

Files

Latest commit

f245d0f · Mar 21, 2025

History

History

problem09

Daily Coding Problem

Note: Continuous improvements and bug fixes are made within the repository to produce better solutions.

Day 9

Given a list of integers, write a function that returns the largest sum of non-adjacent numbers. Numbers can be 0 or negative.

For example, [2, 4, 6, 2, 5] should return 13, since we pick 2, 6, and 5. [5, 1, 1, 5] should return 10, since we pick 5 and 5.

This problem was asked by Airbnb.

Solution | Tests