This module introduces students to the design and implementation of fundamental data structures and algorithms. The module covers basic data structures (linked lists, stacks, queues, hash tables, binary heaps, binary search trees, and graphs), searching and sorting algorithms, basic analysis of algorithms, and basic objectoriented programming concepts.
Note: This introductory message will not be prominent the next time you visit this URL again. This behavior is normal. You can view it again by scrolling to the top of this page.
This is the first time CS2040/C is offered after the CS1020+CS2010 combination in the past six years. Thus there is no comparable reference yet other than the fact that this module is "CS1020+CS2010 but without the basic form of recursion (shifted downwards to CS1010), without advanced form of Java/C++/OOP stuffs (shifted sideways to CS2030), without MST and the last part of old CS2010/DP (both shifted upwards to CS3230)". Also, CS2040/C is a subset of the no longer available CS2020.
The quota of this class for S1 AY2017/2018 is 80 students. But ~120 CEG students, ~40 InfoSec students, and ~40 minor/second major students are expected to take this module across S1 or S2 in AY 2017/2018. So that is ~(120+40+40) ~= 200 students across 2 semesters, with more students in S2 than in S1 so I am expecting 80 vs 120 in S1 vs S2... After Week 02, the class size for Sem1 is just 40 students, exactly half of the expected 80, with the only 'correct' projection is the number of senior students who are taking CS2040C for minor/second major (about ~25).
The old CS1020 and CS2010 will still remain in AY2017/2018 (still have normal size this S1 but will have smaller sizes in future semesters) but will only be applicable for older cohort only (freshmen cohort in AY2017/2018 onwards will have to go through CS2040/C route).
Some other facts:
Tutorial Teaching Assistant (2 tutorial sessions @ COM10230, every Monday, 1415 or 1516):
Laboratory Teaching Assistant (2 laboratory sessions @ COM1B112, every Friday 0910 or 1011):
This is what you will learn if you take CS2040C in S1 or S2 (both taught by Steven):
If you have any important questions regarding this module, email stevenhalim at gmail dot com. Relevant answers will be posted here to reach wider audiences.
Note: This course registration section will not be prominent from Week 1 of S1 AY 2017/2018 onwards (after first lecture). This behavior is normal. You can view it again by scrolling to the top of this page.
Date  News 

Week  Tutorial, 1 hour/week Every Monday from Wk03, 1415 or 1516 Venue: COM10203 Ranald's Consultation: Mon 910 Venue: COM1215 (ACM ICPC Lab) 
Lecture, 2x1.5 hours/week Every Thursday 1617.30 and Every Friday 1213.30 from Wk01 Venue: COM10212 (SR3) 
Lab Demo, 1 hour/week Every Friday from Wk03, 910 or 1011 Venue: COM1B112 


0, Bef 14 Aug 
Not Started 
Note 1: Steven visited Tehran, Iran for IOI 2017 (27 Jul05 Aug 2017) Note 2: National Day, Wed, 09 Aug 2017 Not started, but please revise your CS1010 & CS1231 (if you have took this module) 
Not Started  
01, 1418 Aug 
Not Started 
01a. Introduction, Course Admin VisuAlgo + Mooshak + this Private IVLE + Kattis/UVa Basic C++ review: I/O, control flow: repetition, selection Kattis problems discussed: hello, timeloop, eligibility 01b. Introduction to C++ (new format) Basic C++ review (continued): array, function, simple class, C++ STL vector Kattis problems discussed: statistics, zamka, bookingaroom 
Not Started  
02, 2125 Aug 
Not Started 
02a. Analysis of Algorithms (new format) Basic C++ review (continued): string (stream) Kattis problem discussed: autori Analysis of simple C++ programs that use simple arrays/vectors Kattis problems discussed: (several previous problems), register Reminder 1: There is D01 tomorrow morning (Friday, 25 Aug) Reminder 2: Read sorting eLecture slides before coming to Lecture 2b 02b. Sorting (first half) Sorting Online Quiz (easy), C++ STL algorithm: sort, stable_sort Kattis problems discussed: mjehuric, cups, sortofsorting 
D01: Introduction, C++ STL (algorithm, vector) C++ string Review C++ code so far 

03, 28 Aug 01 Sep 
T01: Introduction, C++ OOP (basic), Analysis, Sorting (part 1) tut01.pdf, tut01ans.pdf (see IVLE) 
03a. Sorting (second half) Sorting Online Quiz (medium), C++ STL algorithm Focus on the harder content of sorting eLecture and sorting Online Quiz PS: Hari Raya Haji, Fri, 01 Sep 2017 No Friday class 
MOVE UPWARDS to Week02 (confirmed, so we start coding from Week02) PS: Hari Raya Haji, Fri, 01 Sep 2017 No Friday class today 

04, 0408 Sep 
T02: Sorting (part 2), One Application, ADT Introduction List ADT (array/vector), tut02.pdf, tut02ans.pdf (see IVLE) 
04a. List ADT: Linked List Linked List Online Quiz (easy), C++ STLs: list Focus on the harder content of SLL; can already touch Stack ADT in future lecture 4a 04b. Stack, Queue, Deque ADTs: Linked List variants Linked List Online Quiz (medium), C++ STLs: stack, queue, deque Focus on Stack, Queue, DLL, Deque and a few other small technicalities of Linked List Kattis problem discussed: evenup 
D02: C++ OOP Review List ADT (vector), We implement this, One sorting challenge, PS1 debrief, VisuAlgo OQ demo (sorting) 

05, 1115 Sep 
T03: List ADT, Linked List Review, Stack/Queue/Deque ADT, Applications tut03.pdf, tut03ans.pdf (see IVLE) 
05a. Review of Graphs and Trees (until 64) CS1231 happens to be not a prereq of CS2040C, so I will play safe 05b. Priority Queue (PQ) ADT: Binary Heap Binary Heap Online Quiz (medium), C++ STL priority_queue 
D03: C++ STL (list), C++ STL (stack/queue/deque), Implementation Demo (PS2 D), VisuAlgo OQ demo (list) 

06, 1822 Sep 
T04: Midterm Test Preparation, CS1231 Review, Priority Queue ADT, tut04.pdf, tut04ans.pdf (TBA) 
06a. Application 1  Arrays/Vectors+Sorting+Lists+PQ Preparation for Midterm Test tomorrow Up to Week 06 T04, i.e. Priority Queue Review of simple proofs Kattis problems discussed: TBA 06b. Midterm Test (15%) During our Friday lecture time Before recess week, to avoid fighting with other modules on Week 07 
D04: PS2 debrief C++ STL (priority_queue), MaxMin conversion, BinaryHeapDemo.java, Demo on solving UVa 1203, Midterm test preparation 

We can take a break this week :) 

07, 0206 Oct 
T05: Midterm Test Debrief, Deeper Binary Heap stuffs, tut05.pdf (TBA), tut05ans.pdf (TBA) 
07a. Table ADT part 1: Hash Table Hash Table Online Quiz (easy), C++ STLs: unordered_set, unordered_map 07b. More Hashing Hash Table Online Quiz (medium), C++ STLs: unordered_multiset, unordered_multimap 
D05: Manual Implementation, of first half stuffs, VisuAlgo OQ demo (heap), TBA 

08, 0913 Oct 
T06: Table ADT 1  unordered, Hashing concepts, Hash Table issues, tut06.pdf (TBA), tut06ans.pdf (TBA) 
08a. Table ADT part 2: Binary Search Tree BST Online Quiz (easy, BST only), BSTDemo.cpp 08b. AdelsonVelskii Landis (AVL) Tree BST Online Quiz (medium, including AVL), AVLDemo.cpp, C++ STLs: set, multiset, map, multimap 
D06: Table ADT 1, C++ STL (unordered_map), C++ STL (unordered_set), PS3 discussion TBA 

09, 1620 Oct 
T07: Table ADT 2, BST/AVL advanced stuffs, PQ ADT alternative implementation, Comparison with Table ADT 1, unordered vs ordered tut07.pdf (TBA), tut07ans.pdf (TBA) 
PS: Deepavali, 18 Oct 2017 (Wed) 09a. Graph Data Structures + Simple Applications Graph DS Online Quiz (medium), No builtin C++ STL container 09b. Graph Traversal: DepthFirst Search and BreadthFirst Search + Simple Applications DFS/BFS Online Quiz (easy), DFSBFSDemo.cpp, No builtin C++ STL algorithm 
D07: PS3 debrief, Table ADT 2, BST/AVL Tree stuffs, C++ STL (set, map), TBA 

10, 2327 Oct 
T08: Graph DS Review, Some Graph Properties, Conversion exercises, Modeling exercise 1, DFS/BFS Review tut08.pdf (TBA), tut08ans.pdf (TBA) 
10a. Graph Traversal continued DFS/BFS Online Quiz (medium) 10b. SingleSource Shortest Paths (SSSP) Problem: Bellman Ford's, BFS SSSP Online Quiz (easy), BellmanFordDemo.cpp, No builtin C++ STL algorithm 
D08: Graph DS conversions, Manual Implementations, PS4 discussion, TBA. 

11, 30 Oct 03 Nov 
T09: DFS/BFS advanced stuffs, Cycle, Floodfill, Bipartite, Toposort++, Modeling exercise 2, tut09.pdf (TBA), tut09ans.pdf (TBA) 
11a. SSSP continued: Dijkstra's (2 versions), On Tree, On DAG SSSP Online Quiz (medium), DijkstraDemo.cpp, No builtin C++ STL algorithm 11b. Practical Exam (9%) Timing: During our 12.051.25pm (80m) lecture slot Venue: Likely COM1BPL2 (capacity 46) We can do this as current class size (41) is ≤ 46 
D09: PS4 debrief, Demo on solving UVa 00469, Kattis  breakingbad, and UVa 12160. 

12, 0610 Nov 
T10: BFS, Bellman Ford's, Dijkstra's Review, Modeling exercises 3, tut10.pdf (TBA), tut10ans.pdf (TBA) 
12a. Application 2  Trees and Graphs Steven will depart to ACM ICPC Jakarta 2017, 10111213 Nov 2017 12b. Cancelled Steven is away for ACM ICPC Jakarta 2017, 10111213 Nov 2017 
D10: Demo on solving UVa 12878, PS5 (almost full) discussion, VisuAlgo Online Quiz demo, Class Photo. (Participation Marks Given, 3%) 

13, 1317 Nov 
Likely Cancelled T11 is moved to Lecture 13a timing Reason to be announced after Week 03 
13a is T11 as Steven will disappear for this :O (timing clash) Ranald will run T11 in this Lecture 13a slot. T11: Harder SSSP concepts, Floyd Warshall's/APSP, Final Preparation, Class Photo, (Participation Marks Given, 3%) tut11.pdf (TBA), tut11ans.pdf (TBA) 13b. Application 3  Mix and Match, Last Lecture 
D11: PS5 short debrief, VA Online Quiz (15%) (link TBA) Time: 40m All topics in CS2040C 

Consultation Slots: TBA Written Quiz 2 Past Papers (from other relevant modules, notice that the syllabus have changed!): CS2010201112S1WQ2medium.pdf, CS2010201213S1WQ2medium.pdf, CS2010201314S1WQ2medium.pdf, CS2010201415S1WQ2medium.pdf, CS2010201516S1WQ2medium.pdf. Final Assessment Past Papers (from other relevant modules, notice that the syllabus have changed!): CS2010201112S1final.pdf, CS2010201213S1final.pdf, CS2010201314S1final.pdf, CS2010201415S1final.pdf, CS2010201516S1final.pdf. 

Date and Time: Wed, 06 Dec 2017, EV Venue: TBA 
Steven uses a smallscale gamification system in his version of CS2040C for extra study motivation.
The list of possible achievements are as follows: (achievements highlighted with red color/green color are already completed in the past/being given, respectively)
Tut  Lab  Student Name 
