Skip to content
Jonathan Zea edited this page Nov 21, 2020 · 1 revision

Welcome to the codevita_practice wiki!

Problem 3: Dole Out Cadbury

The pattern

The proposed solution is based on the following patern: Image6

For a given width, the variable length is "periodic" every width, but increased by 1. Image6

Now, we just need to calculate the correspoding value in the range [0-width].

Clone this wiki locally