← ALL NOTES
Array

1018. Binary Prefix Divisible By 5

For each prefix of a binary array (read most-significant-bit-first), report whether that prefix's value is divisible by 5. The prefix value grows exponentially, but divisibility only needs the…

Loading…