Ultimate Guide: Master Sum67 on Codingbat

How To Do Sum67 In Online Codingbat

Ultimate Guide: Master Sum67 on Codingbat

The `sum67` method in `CodingBat` takes an array of integers and returns the sum of the numbers in the array. However, for every 6 that appears in the array, all subsequent numbers up to (but not including) the next 7 are excluded from the sum.

For example, the `sum67` of `[1, 2, 2, 6, 99, 99, 7]` is `5`. This is because the `6` at index `3` excludes the subsequent `99` at index `4` from the sum.

Read more