Download presentation
Presentation is loading. Please wait.
1
March 2005 1R. Smith - University of St Thomas - Minnesota QMCS 130: Today’s Class GradingGrading The examThe exam Sorting arraysSorting arrays Pointers, structs, linked listsPointers, structs, linked lists
2
March 2005 2R. Smith - University of St Thomas - Minnesota Grading and the Exam Labs in CLabs in C –Pig Latin is the last one –Some ‘interesting’ results when including punctuation at end ExamExam –Some missed a few, some missed a lot –140 Points: Counted a total of 120 Essentially, a 20-point programming question for ‘free’Essentially, a 20-point programming question for ‘free’ Nobody is flunking the classNobody is flunking the class –Lowest grade is C minus at this point –A few “just barely” B minuses Class Median is currently a B+Class Median is currently a B+
3
March 2005 3R. Smith - University of St Thomas - Minnesota The Exam 1: no cast needed1: no cast needed 2: changing the loop type isn’t enough2: changing the loop type isn’t enough 3: Everyone got this3: Everyone got this 4: definition vs use4: definition vs use –Array index: NOT 5: Everyone got this5: Everyone got this 6: No affect on the ‘return type’6: No affect on the ‘return type’ 7: Most got nailed7: Most got nailed –4 chars in a ‘3 char string’ 8: Most got this8: Most got this 9: Most got this 10: Most got this 11: Lots of trouble –Examples in the book –Example in ‘date’ program 12: Most got this 13-15: Most got this –Some confused 13, 14, 15 16: Else if tricks 17: Most got this 18: Some had big trouble –It was the biggest programming question
4
March 2005 4R. Smith - University of St Thomas - Minnesota Sorting Like Pig Latin (oh, boy!)Like Pig Latin (oh, boy!) You have to index into an array and do thingsYou have to index into an array and do things How do we sort a pile of cards?How do we sort a pile of cards? –“Radix sort” – sort by number values –“Minimum sort” – sort lowest values to the bottom, then next lowest, etc. Using a computer to sortUsing a computer to sort –Unlike cards, computers easily swap values
5
March 2005 5R. Smith - University of St Thomas - Minnesota Break the problem into loops “Inner Loop”“Inner Loop” –Sort the lowest value you can find to the start of the array “Outer Loop”“Outer Loop” –Do the inner loop repeatedly –Repeat each time you have the lowest value in the first spot For each repeat, look at all the array MINUS the first spotFor each repeat, look at all the array MINUS the first spot
6
March 2005 6R. Smith - University of St Thomas - Minnesota Pointers Pointers and StructsPointers and Structs Linked ListsLinked Lists
7
March 2005 7R. Smith - University of St Thomas - Minnesota Creative Commons License This work is licensed under the Creative Commons Attribution-Share Alike 3.0 United States License. To view a copy of this license, visit http://creativecommons.org/licenses/by- sa/3.0/us/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.