Introduction to Computer Science
CompSci 101 : Spring 2014

Algorithmic Problems with Tests (APTs) give you a description of a problem and ask you to write code to solve it. You receive immediate feedback about whether or not you have solved a problem fully because the function(s) you write are tested on a variety of input values.

Learning programming and problem solving, like learning a musical instrument or a sport, requires practice, lots of practice — you cannot simply read about or memorize the concepts. Doing these problems each week will give you a good sense of how well you are keeping up with the course material. The problems are listed roughly in order of difficulty, thus expect the later problems in each set to be much more challenging that the first problems.

Access problems on CloudCouder at Duke

Problem Set 7, EXTRA CREDIT, due Monday, April 21
  1. freeParks
  2. onProbation
  3. pictureFrames
  4. isomorphicWords
  5. editThesaurus
  6. internetSecurity
  7. tournamentRanker
  8. twoFriends
Problem Set 6, due Tuesday, April 1
  1. groceryBagger
  2. sortByFreqs
  3. mostAnagrams
  4. medalTable
  5. contestWinner
  6. chocolateBar
  7. positiveID
Problem Set 5, due Monday, March 24
  1. clientsList
  2. memberCheck
  3. uniqueZoo
  4. morseLikeCode
  5. namesForYear
  6. biggestFan
  7. contestRankings
Problem Set 4, due Monday, March 3
  1. uncommonCount
  2. sortedFreqs
  3. accessLevel
  4. alliteration
  5. highCard
  6. minCostPalindrome
  7. speedDial
Problem Set 3, due Tuesday, February 18
  1. bagelCount
  2. packingObjects
  3. yahtzeeScore
  4. auctionResults
  5. aimToTen (note, requires a while loop)
  6. rot13
  7. txMsg
  8. runLengthEncode
Problem Set 2, due Tuesday, February 11
  1. validatePassword
  2. cleanWord
  3. commonCount
  4. circlesCountry
  5. removeDupes
  6. createAcronym
  7. typingDistance
  8. lawFirm
Problem Set 1, due Thursday, January 30
  1. laundryTime
  2. addTime
  3. ticketProfit
  4. gravity
  5. runningDistance
  6. slopeBetweenPoints
  7. silverDistance (challenging — requires if statements)

Submission

These problems will be assigned almost every week during the semester. Only problems turned in by the due date will be given credit for that week — no late APTs will be accepted. Completing past problems may not help your grade directly, but is an excellent way to study for the exams.

When you work within CloudCoder, you do not need to do anything more for it to be graded. When you work within Eclipse, submit it electronically from within Eclipse or on the web.

You are not graded on the quality of source code, but based on how many of the test cases your solution solves correctly.

Grades will be posted on Sakai. All care will be taken to make sure that grades are accurately calculated and reported. However, mistakes happen. If you believe there is an error in your grade, we want to fix it. Use this Google form to report your concern.