Course Level
Knowledge Unit
Fundamental Data Structures
Collection Item Type

In this lab, students using process oriented guided inquiry learning (POGIL) dissect a program that solves the Towers of Hanoi puzzle. Three increasingly sophisticated implementations are provided: one that hard-codes the solution, one where methods call other methods to solve simpler problem instances, and one using recursion. Learning objectives include understanding recursion and critical thinking. This lab allows students to read an existing program rather than creating one from scratch.

The author of this material was awarded a 2017 NCWIT Engagement Excellence Award for this and two other of his POGIL assignments. Learn more about the award at


POGIL Activities Teams of 3-4 students work well in this lab. Students should be assigned roles such as manager, recorder, presenter, and analyst. Prior exposure to static methods is recommended.

Additional recommendations include:

Engagement Highlights

This POGIL lab is a well-structured collaborative learning experience and has significant benefits for engagement and inclusion. The game-based nature of this lab is appealing and welcoming to many students. To increase engagement, consider providing additional information about the history of the puzzle, Towers of Hanoi.

Computer Science Details

Programming Language

Material Format and Licensing Information

Creative Commons License