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

Have students write a genetic algorithm in Java to solve instances of the Traveling Salesman Problem so that they can practice object-oriented programming and responsibility-driven design.
Discuss and explore the difference between additive (sequential) and multiplicative (nested) loop structures to give students practice reasoning about loops.
Highlight key differences between math, CS, and engineering to give students context for why CS is a distinct field in itself. Let students know that you don’t necessarily have to excel in one field to excel in the others.

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

Privacy Policy