Data Structures

CSI33      D01 (66094)

Monday, Wednesday, 12:00 pm-1:50 pm, room ME 302
 

 
Date Class Materials HW assignment
Week 1 6


Reminders:
1) The due date for the Final Project is December 20th (the date is corrected!);
2) Our Final Exam will be on Thursday, December 20th (ME 328, same time). Check our more on Midterm and Final Exams
 
12/13 Review
place: ME 328
time: 12pm - 2pm
 
12/12 Sections 14.1 - 14.4

Lecture slides: CSI33-lecture27_part1.pdf, CSI33-lecture27_part2.pdf
Dikstra's example: DijkstrasExample.pdf
Breadth First Search implementation in C++: BFS.h, BFS.cpp, usingBFS.cpp, input1.txt

Breadth First Search Demonstration (you tube, ~9 mins): https://www.youtube.com/watch?v=EuwG9nk0VxQ

Dijkstra algorithm Demonstration (you tude, ~9 mins): https://www.youtube.com/watch?v=8Ls1RqHCOPw

A short (~2mins) but very nice video of depth first search algorithm application: https://www.youtube.com/watch?v=mE_PCK0oFyo

In-class Work: CSI33_Lecture27InClassWork.pdf
Solutions: CSI33_Lecture27InClassWorkSols.pdf
 
12/10 Section 13.3 in C++

Lecture slides: CSI33-lecture26.pdf

programs (in C++): TreeNode.h, TreeNode.cpp, AVLTree.h, AVLTree.cpp, TestAVLTree.cpp
programs (from the book, in Python): TreeNode.py, AVLTree.py, helpForAVL.py

in-class work (with solutions):
CSI33-AVL-In-Class-Practice.pdf,
avl_handout-CSVirginiaEDU.pdf
 
Suggested exercises (for practice, not for grade):

1) Multiple-Choice questions: p. 481 / 10
2) Short-Answer Questions: p. 481 / 2
3) AVL trees (Short Answer questions): page 481 / 4-11,
Answers: Chapter13-AVL-answers.pdf
4) Look through the AVL code in Python and lecture slides - understand how the rotations are done. Finish up the AVL.py code.
Comments
: you can use the following code for testing/seeing what is happenning(just add it to your program) helpForAVL.py
5) Look through the AVL code in C++ thoroughly
 
Week 15

Our Final Exam date and place has changed: December 20th, 12pm - 2pm at ME 328
 
12/05 Section 7.5 in C++

Lecture slides: CSI33-Lecture25.pdf

programs (in C++):
TreeNode.h, TreeNode.cpp, usingTreeNode.cpp,
BST.h, BST.cpp, usingBST

Useful links:
BST delete node: http://www.algolist.net/Data_structures/Binary_search_tree/Removal
Insertion and deletion (6 mins video): https://www.youtube.com/watch?v=wcIRPqTR3Kc
Comment: deletion procedure here follows a different strategy: right subtree, leftmost element.

In-class work: see lecture slides
Suggested exercise (for practice, not for grade):

1) define the delete operation for BSTs in our C++ code (use Python's code)

2) define the reverse operation for BSTs (in C++ and in Python implementations) that will reverse the structure of the BST, i.e. for every node, all nodes in the left subtree have values greater than the value of the node; and all nodes in the right subtree have values less than the value of the node.
12/03 Sections 13.3-13.5 in C++

Lecture slides: CSI33-Lecture24.pdf

programs (in C++): Heap.h, Heap.template, testingHeap.cpp,
mapUse.cpp
programs (from the book and not, in Python): Heap.py, usingHeap.py

C++ map reference: http://www.cplusplus.com/reference/map/map/

In-class Work: see lecture slides, files to use: PQueue_ideas.py
Answers/solutions: PQueue.py
Suggested exercises (for practice, not for grade):

0) Look through the hash examples in Section 13.5
1) True/False questions: p. 478 / 1, 2
2) Short-Answer Questions: pp. 479 - 480/ 1, 2, 4, 5, 8, 9
3) In-class work
Answers: Chapter13-answers.pdf
Week 14

Summarize the data structures we explored so far with the run-time efficiency of common operations!!!

Here you can find your HW and quizzes gardes: Tell me my grades

Final Project: don't forget to review the comments and guildeline for Final Projects!
CSI33FinalProjectSubmissionGuideline.pdf
 
11/28 Sections 12.1-13.2

Lecture slides: CSI33-Lecture23.pdf
programs (from the book and not): maximum.cpp, vec1.cpp, vec2.cpp, vec3.cpp, Stack.h, Stack.template, test_Stack.cpp

Reference manual for Vector class template: http://www.cplusplus.com/reference/vector/vector/

Algorithms library reference manual: http://www.cplusplus.com/reference/algorithm/

In-class Work:
1) Implement a template minimum function and test it on int and double type values.
Solution: minimumInClassWork.cpp

2) Implement a Queue using templates along with the code to test it. This is a suggested HW assignment.
Solution
: Queue.h, Queue.template, test_Queue.cpp
Suggested exercises (for practice, not for grade):

1) True-False questions: p. 440 / 1, 2, 5

2) Multiple-Choice questions: p. 440-441 / 1, 2, 4

3) Programming exercise: p. 442 / 2
Solution: Queue.h, Queue.template, test_Queue.cpp
Answers: Chapter12questionsAnswers.pdf
11/26 Sections 11.1 - 11.4

Lecture slides: CSI33-Lecture22.pdf

programs (from the book and not): ListNode.h, LList.h, LList.cpp, testLList.cpp

In-class Work: see lecture slides.
Solutions:
2) ListNode2.h, LList2.h, LList2.cpp, testLList2.cpp
3) to be posted
HW19 (due date: Wednesday, 12/05) - last HW assignment

1) Programming exercise: p. 424 / 2
    here is the code to check that your program works correctly: Chapter11-testLList2.cpp

Suggested exercises (for practice, not for grade):

1) True-False questions: p. 422 / 1, 2, 5

2) Multiple-Choice questions: p. 423 / 1, 2, 4

3) Short-Answer questions: p. 424 / 1, 2
Solutions: Chapter11questionsAnswers.pdf
Week 13

November 22-23 the college is closed.


We have 18 graded homework assignments in total, five lowest homework scores will be dropped.
11/21 Sections 10.4 - 10.5

Lecture slides: CSI33-Lecture21.pdf

programs (from the book): List.h, List.cpp, testList.cpp, testList1.cpp, testListp.cpp
Check out this one as well: unsigned.cpp

In-class work: see lecture slides
Solution (only for cin): List2.h, List2.cpp, testList2.cpp
 

HW18 (due date: Friday, 11/30)

Programming exercise: p. 400 / 4
see and use: mystring.h, mystring_draft.cpp, string_using.cpp

reccomendations:
1) Start with definitions of constructor, destructor, operator+=(const char c), resize and cout functions.
2) Then add operator[], search/find, and reverse definitions.
3) Conclude with definitions of copy constructor, assignment operator= (both of these operators can use private method copy), and operator+=(const String& str)input method is already defined in the files provided.  

11/19 Sections 10.1 - 10.3

Lecture slides: CSI33-Lecture20.pdf
programs: Source.cpp
In-class work: see lecture slides

Answers:
1) we do have a memory leak, see the picture
2) program: CSI33Lecture20InClassWork.cpp
HW17 (due date: Monday, 11/26)

Short-Answer questions: p. 399 /5, 6

Suggested exercises (for practice, not for grade):
1) True-False questions: p. 396 / 3, 4,
2) Multiple-Choice questions: p. 397 / 1, 2, 3, 5
Solutions: Chapter10-questionsAnswers_part1.pdf
Week 12

Summarize the data structures we explored so far with the run-time efficiency of common operations!!!

Here you can find your HW and quizzes gardes: Tell me my grades
 
11/14 Sections 9.4 - 9.5

Quiz 8

Lecture slides: CSI33-Lecture19.pdf

programs (from the book):
mainv1.cpp, Rationalv1.cpp, Rationalv1.h;
Rationalv2.h, Rationalv2.cpp, mainv2.cpp;
Rationalv3.h, Rationalv3.cpp, mainv3.cpp;
Card.h, Card.cpp, using_Card.cpp

in-class work solution: (with counter_ placed in the private section):
Card-InClassWork.h, Card-InClassWork.cpp, using_Card2.cpp
 
HW16 (due date: Wednesday, 11/21)

1) Programming Exercise: p. 352 / 3
Use this code to test your program: Rational_testing.cpp

Suggested exercises:

1) Short Answer questions: page 351/4
Answers to some of the True/False and Multiple Choice questions from Chapter 9: Chapter9-questionsAnswers.pdf
2) Define a Complex Number class using rectangular form of complex numbers, i.e. any complex number is r+mi, where r and m are real numbers and i is imaginary unit). Recall that i2 = -1.

The class should have +,-,and * binary operations defined.

Here are examples of operations:
(2+3i)+(9-7i) = 11-4i
(2+3i)-(9-7i) = -7+10i
(2+3i)*(9-7i) = 18-14i+27i-21i2 = 18+21+13i = 39 + 13i 
11/12 Sections 8.17, 9.1-9.3

Quiz 7

Reference manual to C++ string class: http://www.cplusplus.com/reference/string/string/

comparison of C-strings and C++ strings: http://cs.stmarys.ca/~porter/csc/ref/c_cpp_strings.html

Lecture slides: CSI33-Lecture18.pdf

programs (from the book):
Rational.cpp, Rational.h, MainProg.cpp;
RationalOldStyle.cpp;
stringex.cpp, getline.cpp, readfile.cpp

HW15 (due date: Monday, 11/19)

1) Read chapter 8 and go through the True/False and Multiple choice questions,
2) Read sections 9.1-9.3, and go through the True/False questions 1-13, and multiple choice Questions 1-6 (not for submission),
3) Write a program that reads a collections of values (decimal numbers) from the input file and
- finds the smallest value,
- find the greatest value,
- finds the average of all values,
- finds the average of all positive values,
- finds the average of all negatice values,
- reports how many zeros,
- reports how many positive values are in the file,
- reports how many negative values are in the file,
- sorts them and stores the sorted collection of values in an output file.

All the information (except for the sorted collection) should be displayed on the screen. Each item above (finding smallest value,etc.) should be defined as a function.
Week 11

Keep summary of the data structures we explored so far with the run-time efficiency of common operations!!!

Final Projects list and instructions: CSI33FinalProjects_Fall2018.pdf
Doodle poll (where you state which project you are working on): https://doodle.com/poll/iiuvx5iab98adf2u

Please note that only one person can work on a project. If the project is alreadt taken, chose another one.

In Visual Studio to keep console window "not closed" follow these instructions:
right click your project name,
go to Properties page,
expand Configuration Properties -> Linker -> System,
click on the SubSystem - you will see dropdown menu on the right,
select Console (/SUBSYSTEM:CONSOLE) in dropdown.

By default, the Empty project does not specify it.
 
11/07 Sections 8.12-8.17

Quiz 6

Lecture slides: CSI33-Lecture17.pdf (starting from headers)

programs (from the book):
conversions.cpp, conversions.h, conversions2.h;
macro.cpp;
reference.cpp;
scope.cpp;
switchWithAssert.cpp, switch.cpp, switch2.cpp, switch3.cpp;
selection.cpp

In-class work: CSI33_Day17_InClassWork.pdf
Solution: functions.h, inClassWork17.cpp
 
HW14 (due date: Wednesday, 11/14)
1) Read about macros on page 302 and see example (macro.cpp)

2) read sections 8.17.2 and 8.17.3

3) programming exercise: page 317/ 8-9 (do it in one program)
test code and header for your programs: searches.h, test_searches.cpp


Suggested exercises:
(for practice, not for grade):

1) look through the True/False and Multiple choice questions of Chapter 8

2) Use our Python code (mergeSort.py) and write the definition of Merge Sort. Use the following files to put Selection sort (selection.cpp) and Merge sort into: sort.h, sort.cpp, and then use these ones to test them: test_sort.cpp, test_sort2.cpp.

 
11/05 Sections 8.8-8.11

Lecture slides:CSI33-lecture16.pdf,
CSI33-Lecture17.pdf (up to headers, excluding)

programs (from the book): grades.cpp, if1.cpp, if2.cpp, if3.cpp, typeConvs.cpp, loopExample1.cpp, buffer.cpp, str1.cpp

Here is a link to C-string vs C++ string: http://cs.stmarys.ca/~porter/csc/ref/c_cpp_strings.html


In-class work: see the last slide of the lecture slides
Solution: CSI33-Day16-InClassWork2.cpp 
HW13 (due date: Sunday, 11/11)
2) programming exercises: page 316/ 1, 2, 3, 4, 6

for programming exercise 2, here is the link to the slides that give the algorithm for it (starting from slide 53): CSI30-Ch3Section1part2.pdf
Week 10

Summarize the data structures we explored so far with the run-time efficiency of common operations!!!

Here you can find your HW and quizzes gardes: Tell me my grades
 
10/31 C++ is coming to our classroom!

Sections 8.1-8.7

Quiz 5

Lecture slides: CSI33-lecture15.pdf

programs (from the book): ctof.cpp, swap.cpp, increment.cpp, uninit.cpp

In-class work: see lecture slides
Solutions: FtoC.cpp, CSI33-Day15-InClassWork.cpp

Software:
1) We have Microsoft Visual Studio installed on all computers at CP 320.
Get Community Edition, package: Desktop development with C++ (free):
https://www.visualstudio.com/downloads/

2) You can also use Dev-C++ (for Windows platform only, free)
http://orwelldevcpp.blogspot.com/
- look under Downloads, pick The setup which includes TDM-GCC 4.8.1 (32bit and 64bit)(47MB): http://sourceforge.net/projects/orwelldevcpp/files/Setup%20Releases/Dev-Cpp%205.10%20TDM-GCC%204.8.1%20Setup.exe/download

- The portable version with compiler: The portable version which includes TDM-GCC 4.8.1 (32bit and 64bit) (34MB): http://sourceforge.net/projects/orwelldevcpp/files/Portable%20Releases/Dev-Cpp%205.10%20TDM-GCC%204.8.1%20Portable.7z/download

3) Code Blocks (for all platforms, free): http://www.codeblocks.org/downloads/26

4) JetBrains CLion
It is free, but you will have to apply for it with your school e-mail. The confirmation will be sent to your e-mail immediately. Then you can proceede to the download page and get CLion.

https://www.jetbrains.com/student/
 
Not for grade (due date: Monday, 11/05)
1) Install a C++ compiler on your home computer,
2) Read the beginning of Section 8.2 (pages 256-257),
3) Run all the programs from the lecture.

10/29 Section 7.5

Quiz 4

Lecture slides: CSI33-Lecture13.pdf

programs (from the book): TreeNode.py, BST.py
other programs: usingBST.py

Useful links:
BST delete node: http://www.algolist.net/Data_structures/Binary_search_tree/Removal
Insertion and deletion (6 mins video): https://www.youtube.com/watch?v=wcIRPqTR3Kc
Comment: deletion procedure here follows a different strategy: right subtree, leftmost element.

In-class work: see lecture slides
Solutions:CSI33Leture13InClassWorkSols.pdf, InClassWorkDay13.py
 
HW12 (due date: Sunday, 11/04)
1) programming exercises:
p. 248 / 2, 3, 5
Test code you can use for these problems: TestCodeForHWAssignment.py

2) Write unit tests for class BST to test insert_rec and find method, by doing the following:
Insert the following elements, one by one into a tree: 7, 3, 8, 2, 5, 9, then by using BST's method asList compare the produced by that method list with list [2,3,5,7,8,9] - this is one unit test for insert_rec method.
To test the find method: create the same BST as above, and find 8, 2, 9, and 5; compare the result with the numbers themselves. Then try to find 11, 1, and 4 and compare the result of each search with None.

Suggested exercises (not for grade):
1) Short Answer questions: p. 248 / 2, 3, 4
Solutions: Chapter7-questionsAnswers.pdf
Week 9

Summarize the data structures we explored so far with the run-time efficiency of common operations!!!

Here you can find your HW and quizzes gardes: Tell me my grades!!!
 
10/23 Sections 7.1-7.4

Lecture slides: CSI33-Lecture12.pdf

programs (from the book): TreeNode.py

In-class work: CSI33_Day12_InClassWork.pdf
Answers (not updated): CSI33Lecture12pics.pdf
Suggested exercises (not for grade):
1) True-False questions: p. 245 / 1-5
2) Multiple-Choice questions: p. 246 / 2, 3
3) Short-Answer questions: p. 248 / 6

Solutions: Chapter7-questionsAnswers.pdf
10/21 Midterm Exam  
Week 8

Midterm Exam will be on Monday, October 22nd. More details can be found in Midterm in Final Exams.

Keep summary of the data structures we explored so far with the run-time efficiency of common operations!!!

Here you can find your HW and quizzes gardes: Tell me my grades!!!
 
10/17 preparation for Midterm Exam

 
10/15 Sections 6.4-6.6

Lecture slides
: CSI33-Lecture11.pdf

You can watch a video on Merge Sort here: http://en.wikipedia.org/wiki/Merge_sort

programs (from the book): fib.py, selectionSort.py, mergeSort.py, hanoi.py

In-class assignment: see lecture slides 
HW11 (due date: Saturday, 10/20)

programming exercise: pp. 215-216 / 5
 
Week 7

Summarize the data structures we explored so far with the run-time efficiency of common operations!!!

Here you can find your HW and quizzes gardes: Tell me my grades!!!
 
10/10 Sections 6.1-6.3

Lecture slides: CSI33-Lecture10.pdf

programs (from the book): fact.py, reverse.py, anagrams.py, power.py, bsearch.py

In-class work: see lecture slides
Solutions/answers: maxRec.py
HW10 (due date: Monday, 10/15)

programming exercise: p. 215 / 1

Suggested exercises:
(for practice, not for grade):
1) What list is returned by anagrams("word")?
2) True-False questions: p. 212 / 1, 2, 3, 6
3) Multiple-Choice questions: p. 213 / 1, 4, 5, 6
4) Trace recPower(4,8) and and figure out exactly how many multiplications it does.
5) Short Answer questions: p.214 / 1, 5

Solutions: Chapter6Answers_part1.pdf, Chapter6Answers_part2.pdf
10/08
Columbus Day
College is closed

Week 6

Summarize the data structures we explored so far with the run-time efficiency of common operations!!!
 
10/03 Sections 5.3-5.5

Lecture slides: CSI33-lecture09.pdf

programs (from the book): MyQueue.py, palindrome.py

In-class work: see the lecture slides, CabCompany.pdf, TestingCab.py
Solution: CabCompany.py

Self-study:
time-driven simulation: simulation.py, CheckerSim.py
Event-driven simulation: simulationEventDriven.py, CheckerSimEventDriven.py
 
HW9 (due date: Wednesday, 10/10)

programming exercise: p. 184 / 4
10/01 Quiz 3 (covers Chapters 3 and 4)

Sections 5.1-5.2

Lecture slides: CSI33-lecture08.pdf

programs (from the book): Stack.py, parensBalance2.py

In-class assignment: see lectures slides.
Solutions/answers: In-classWorkAnswers.pdf, Stackunittesting.py

Check out these useful videos:
Infix to Postifx:
https://www.youtube.com/watch?v=rA0x7b4YiMI
Infix to Prefix:
https://www.youtube.com/watch?v=fUxnb5eTRS0
 
HW8 (due date: Sunday, 10/07)
programming exercise: p. 184 / 3 (use Stack to evaluate the post-fix expression as shown in lecuture slides)

Suggested exercises:
1) True-False questions: p. 181 / 1-4
2) Multiple-Choice questions: p. 182 / 1-5
3) Short-Answer questions: p. 183 / 1

Answers/Solutions: Chapter5-questionsAnswers-part1.pdf, Chapter5-questionsAnswers-part2.pdf
Week 5
 
09/26 Sections 4.4 - 4.5, 4.7

Lecture slides: CSI33-lecture07.pdf

Programs: ListNode.py, LList.py

In-class work: see the last slide in the lecture slides
Solutions: Section4_6InClassWork.py (work with LList),
Fibonacci numbers generator (2 versions): Section4_6InClassWorkGenerator.py, Section4_6InClassWorkGenerator.py Which version do you like better?
HW7 (due date: Wednesday, 10/03)
1) programming exercises: p. 152 / 1, 3 (do both in one file, LList.py)

Suggested exercises:
1) True-False questions: p. 148 / 1, 2, 4, 5
2) Multiple-Choice questions: p. 149 / 1-4
3) take a look at two versions of __copy__ method for LList class's implementation on page 132.
Solutions/answers: Chapter4-questionsAnswersSuggestedProblems.pdf
09/24 Sections 4.2-4.3

Quiz 2 today

Lecture slides: CSI33-lecture06.pdf

Programs: Section4_2example.py, ListNode.py
For in-class work: Sections4_1-4_3InClassWork.py, Section4_2example2.py

In-class work: see lecture slides (the last two slides) and use this file: problems1-2
Answers:
    problems 1-2: ListNode_classwork.py, Sections4_1-4_3InClassWorkProblems1-2.py;
    problems 3-4: In-classWorkProblems3_4.pdf
HW6 (due date: Sunday, 09/30)

Programming assignment: Let's think about doubly-linked lists. Define a class ListNode2, with three attributes: item, leftL, and rightL.
Left link points to the previous node in the list, right link points to the next node in the list.
You can also add the display method to this class (like we did it in class for the ListNode class).
Then test your class.
For example, create a linked list of 5 values: 34, 1, 23, 7, and 10. Display it. Then insert new value, say 8 between 34 and 1 (this time you will have to take care of links pointing to the previous and next node), display the resulting list. Then delete an element, say 7, update the links and display the new list.
Use this draft: ListNode2_forStudents.py


Suggested exercises
(not for grade, but highly recommended):
1) Short-Answer questions: p. 151 / 2
Answers: Chapter4-questionsAnswers.pdf
Week 4

Note that on Tuesday and Wednesday, September 18-19th no classes scheduled - Yom Kippur
 
09/17 Sections 3.5-3.6

Lecture slides: CSI33-lecture05.pdf

Here is a link to time-complexity (aka "Big O" or "Big Oh") of various operations in current CPython: https://wiki.python.org/moin/TimeComplexity

Quiz 2 will be on Monday, September 24th and will be based on Chapters 2 and 3.
HW5 (due date: Friday, 09/21)
programming exercise: p. 104 / 9
See suggested specification with some code here:
Chapter3-prog9SolitaireSpecs.py,
a simpler version: Chapter3-prog9SolitaireSpecs-easy.py


Suggested exercises
(not for grade, but highly recommended):
1) True-False questions: p. 100 / 8, 12
2) Multiple choice questions: p. 101 / 1, 3, 4, 5, 6, 8
3) Short-answer questions: p.102 / 3

Solutions: Chapter3-questionsAnswers-part1.pdf, Chapter3-questionsAnswers-part2.pdf
Week 3

Note that on Monday and Tuesday, September 10th- 11th College Closed - Rosh Hashanah
 
09/12 Sections 3.1-3.4

Quiz 1 today (based on Chapter 1 and Sections 2.1 and 2.2)

Lecture slides: CSI33-lecture04.pdf
HW2 discussion: SelectionSortAnalysis

On this page you can find the link to the compressed file with all the codes from the book:
http://www.fbeedle.com/content/data-structures-and-algorithms-using-python-and-c

more programs (from the book):
CardADT.py,
Card.py (different from previous lecture meeting), Deck.py, Hand.py, TestDeck.py, TestCards.py

If you want to find out how to play Bridge:
rules: http://www.acbl.org/learn_page/how-to-play-bridge/
video: https://www.youtube.com/watch?v=Tyd7KlsRYO4
another video: https://www.youtube.com/watch?v=9yzS_26fICk

In-class work: see lecture slides (last few slides)
Solutions: in-classWork.py 
HW4 (due date: Tuesday, 09/18)

1) Finish implementing the program discussed in class (in-class work, second assignment).
comment: note that at this level you should define classes (for example, for player, for scoring and so forth) where appropriate, also don't forget documentation (both inner comments that start with # and docstrings)! The program must use the classes Card and Deck we defined in class.

2) Programming Exercises: p 103 / 1, 2, 3- all of these exercises should be implemented in one file Deck.py
Test all the operations, send the tests with your HW submission!


Suggested exercises
(not for grade, but highly recommended):
1) True-False questions: p. 100 / 2, 3, 6
2) Short-answer questions: p.102 / 1, 2

Solutions: Chapter3-questionsAnswers-part1.pdf

Week 2
 

Note that on Monday, September 3rd College Closed - Labor Day

09/05 Sections 2.1-2.3, and 2.6 from the book.

Lecture slides: CSI33-lecture03.pdf

Programs:
cardADT.py, test_cardADT.py,
Card-spec.py,
Card.py, testCard.py, unitTestingCard.py

In-class work: start working on the HW assignment
HW3 (due date: Tuesday, 09/11)

Write unit tests to test the methods suit, suitName and rankNameof Card class

See the Chapter2-unitTestingCardHW.py
09/03 college is closed. Labor day.  

Week 1
 
08/29 Section 1.3 Algorithm Analysis

Lecture slides: CSI33-lecture02.pdf

Additional materials: BinarySearchIllustrated.pdf

Additional resources: Check out this simple explanation of big-O notation:
https://medium.freecodecamp.org/big-o-notation-simply-explained-with-illustrations-and-video-87d5a71c0174

In-class work: lecture02InClassPractice.pdf
Solutions: lecture02InClassPracticeSols.pdf
HW2 (due date: Tuesday, 09/04):

1) True/False questions: p. 33 / 4-6, 9, 10 - not for grade
2) Multiple Choice questions: pp.34-35 / 1-6, 10 - not for grade

Solutions: Chapter1solsTFMConly.pdf

3) Short-answer questions: p. 36 / 8 - not for grade
Solution: Chapter1ShortAnswerQuestions.pdf

4) Write a program that has both Linear Search and Binary Search algorithms implemented defined as two seprate functions.
Run each of the algorithms on the list of integers from 0 to 999999 and time them on three different numbers to search for: 10, 499999, and 999999. At the end your program should print the results.
Here is a draft/skeleton of the program: hwAssignment-twoSearches.py

5) Programming Exercises: p. 37-38 / 3, 9
Comments:
* Programming exercise 3 asks you to implement Selection Sort algorithm.
See my comments here: here and
video (about 10 mins) presenting visualization of Selection Sort: https://www.youtube.com/watch?v=f8hXR_Hvybo

* In programming exercise 9 you are not to use the built-in set type.

Reminder: don't forget to put specification for each of the functions you are defining as well as to use internal comments (that start with #)
08/27 Sections 1.1, 1.2

Lecture slides: CSI33-lecture01.pdf

In-class work: lecture01-handout.pdf
Solutions: lecture01-handoutSols.pdf

Announcements:
First two chapters of the book are available through e-reserves:
http://bcc-cuny.libguides.com/er.php?b=c
Choose CSI33 from the list
HW1 (due date: Sunday, 09/02):
1) read Sections 1.1-1.2

2) read about docstring conventions at http://www.python.org/dev/peps/pep-0257/

3) get the book