Lucid Imaging interview question

Merge short with the recursion limit