Miro Interview Question

Hackerrank test with simple algorithmics challenge