Habana Labs interview question

A problem with recursive solution