Habana Labs Interview Question

A problem with recursive solution