Skip to content

Instantly share code, notes, and snippets.

@graingert
Created January 28, 2012 00:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save graingert/1691735 to your computer and use it in GitHub Desktop.
Save graingert/1691735 to your computer and use it in GitHub Desktop.
String template = Exercise 1: Negate a tree (5%%)\n\n" //usually /n's are at the end of the line
+"original tree: \n%s\n"
+"original tree negated: \n%s\n"
+"original tree negated twice (same as original): \n%s\n"
+"empty tree: \n%s\n";
System.out.println();
System.out.printf(template, TreeOps.toString(x), Ex2.negateAll(x), Ex2.negateAll(Ex2.negateAll(x)), Ex2.negateAll(new Tree()));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment