Team Problems in Computer Science
The PDF document below contains computer science problems suitable for solving in teams. They are meant to be done by pairs of students during a class period. I tell my students to try to finish by the end of the period; if they can't, they may complete the assignment for homework and turn it in at the beginning of the next class. Each pair of students (or trio, if you have an odd number of students) turns in one solution, although it may contain one or more pages written by each team member. Each problem is worth 15 points and each student on the team gets the same score unless there is evidence that one student did all or most of the work. An overarching goal of all the problems is to give students experience in working with at least one other person to solve a substantial problem (that is, "substantial" for them at that point in the course). The "larger" nature of the problems lends itself to team solution. In some cases, the problem sheet suggests a way that the two students can divide the work.
Here is a list of the problems.

Averaging Numbers: Write an algorithm for averaging a list of numbers. Focus first on the problem of knowing when the user is finished entering the numbers.
Objective: To make students think about this standard algorithm before they develop a program for it in subsequent classes or labs
Prerequisite knowledge: How to input and output numbers;
For
andWhile
loops

Putting Numbers in Ascending Order: Draw a flowchart for the problem of arranging three numbers in ascending order. Then trace the flowchart using a given set of test data.
Objective: To have students develop the
ifthenelse
logic required to solve this standard problem before they write the code for it in subsequent classes or labsPrerequisite knowledge: How to draw a flowchart with input/output and decision symbols

String Searches: Apply a "bruteforce" method to determine if a given string is contained in another string. Then apply the BoyerMoore algorithm to the same task and note the reduction in the number of steps.
Objective: To have students apply a search algorithm that is not part of their regular classwork
Prerequisite knowledge: How to use a pointer to move through a string; comparing characters

Swapless, Pushless Sorting: Develop an algorithm to sort a list of integers into descending order without swapping any values or pushing values up or down.
Objective: To have students create a sort algorithm that is more efficient than the ones they have learned to code (e.g., ShuttleInterchange, Bubble)
Prerequisite knowledge: At least one sorting algorithm, so as to understand the idea of comparing numbers in a list and swapping those that are out of order

Dealing Cards: Develop several algorithms for dealing a deck of cards and storing them in the computer's memory.
Objective: To have students develop multiple approaches to a problem that underlies numerous card games, including poker and solitaire
Prerequisite knowledge: How to store data in one and twodimensional arrays; random number generation;
ifthen
logic

File Compression: Apply the LZ algorithm to recreate a file from its condensed version and to condense a given file as much as possible.
Objective: To apply a compression/decompression algorithm to "unzip" and "zip" files
Prerequisite knowledge: Understanding of the concept of file compression and the LZ algorithm

Seven Segment Display: Apply the techniques of Boolean algebra to design circuitry to run a sevensegment display for one digit (as used for calculators, cell phones, etc.).
Objective: To apply Boolean algebra techniques to a "realworld" problem that students are familiar with
Prerequisite knowledge: Understanding of truth tables, writing Boolean expressions from truth tables, using Karnaugh maps to simplify expressions, and drawing minimal circuits
Questions or suggestions may be directed to the author at [email protected].
Authored by
Brother Neal Golden
Brother Martin High School
New Orleans, Louisiana