itch.io is community of indie game creators and players

Devlogs

A little recursion problem

Lua Carousel
A downloadable freewheeling app for Windows, macOS, Linux, and Android

Are you reading this on your phone? Quick, see if you can solve this problem without getting up and switching devices.

Convolving a list with itself. Given a list [x1, x2, ..., xn−1, xn], where n is unknown, construct [(x1, xn), (x2, xn−1), ..., (xn−1, x2), (xn, x1)] in n recursive calls.

If you can't do it, try installing Lua Carousel below and try again.

(Problem found in this paper (pdf).)

Download Lua Carousel
Leave a comment