Solves the N2K Challenge with recursive algorithms