Skip to main content
CS Teaching Tips

Main navigation

  • Browse All Tips
  • Tags
  • 3D
  • About
  • Rate Tips
  • Tip Sheets

Have students design an anagram solver in Prolog or Java to introduce recursive backtracking.

  • The final product is fun for students to play around with and demonstrates how powerful a short program can be.
    • Note from the CS Teaching Tips Team: visit the Wikipedia entry on recursive backtracking for more information.
  • For the full assignment, visit Stanford’s nifty assignment page.

More about this tip

Tags

  • Java
  • Other Programming Language
  • CS 2
  • Programming Concepts
External Source
Stanford's Nifty Assignment by Stuart Reges
Other Tips By
Other Tips By Stuart Reges

Similar tips

Be on the lookout for loop syntax that belongs to another language when students are learning multiple languages because they sometimes confuse syntax and create hard to spot bugs.
Show students explicitly how objects and variables might have other names (i.e., aliasing) to help students understand that variable names don’t have to match parameter names because students often find this confusing.
Give students tips and resources to help them shift from one programming language to another.

For more information or to report a bug, contact us at admin@csteachingtips.org. Built with Bootstrap. Powered by Drupal.

Privacy Policy