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.

Share Have students design an anagram solver in Prolog or Java to introduce recursive backtracking. with FacebookShare Have students design an anagram solver in Prolog or Java to introduce recursive backtracking. with Twitter
  • 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

To help students formalize their knowledge of data structures, act out these abstract ideas as a class.
Use Car as an example of an interface because students agree on the general behaviors of a car but can only come up with specific instantiations of cars, which provides students with a strong mental model for interface relationships.
Have students code boundary condition test to handle removing adjacent duplicates to help them better understand data structures and become familiar with common bugs through practice.
  • CSTT Facebook
  • CSTT Twitter

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

Privacy Policy

  • National Science Foundation
  • Sage Fox Group
  • Harvey Mudd College