Sponsored
Solve with full IDE support and test cases
Use these hints if you're stuck. Try solving on your own first.
Use dynamic programming.
Store whether the last element was even or odd.