CompSci 6
Fall 2008
Program Design and Analysis

Algorithm Problem Solving and Testing

APTs are meant to be quick, half- to one-hour problem solving and coding problems. Each problem typically involves writing one or more methods that can be uploaded and tested on a variety of different inputs. You can write any additional supporting methods you feel are necessary; the only restriction is that your code must be all in one file when you upload it for testing.

See the bottom of this page for links to problem statements.

Testing your Code

You should upload a .java file for testing that contains the class and methods described in the problem statement. Be sure you have the correct class name and method signature. The online testing system will make it clear if your program fails to compile.

You should most likely compile your program before uploading it for testing, though you can certainly use the online testing system for compiling as well as testing. However, using the online system will require more time than using your local programming environment. There is no limit on the number of times you can test your program using the online system. When you are finished testing your solution, you should submit for grading using the standard submission system.

Each time you want to test your code, follow these directions (even if you are testing the same problem over again):

Problem:

Code file:

Problem Statements

  1. Fermat vs. Pythagoras
  2. Flapjacks
  3. Picture Frame
  4. Parking Spaces
  5. Number Fill
  6. Rat Route


  7. High Card
  8. Sorted Freqs
  9. Anagrams
  10. Aunt Uncle


  11. Speed Dial
  12. Member Check
  13. ClientsList
  14. Coach
  15. Thesaurus


  16. Birthday
  17. Compress
  18. Punish1
  19. Punish2


  20. DNA CG Ratio Max
  21. Prefix Code
  22. Common Count
  23. Run Length Encode
  24. Repeated Substrings


  25. One Heap Nim
  26. Laundry
  27. Pancakes
  28. TippingWaiters