CS 202: Fundamental Structures of Computer Science II

Fall 2021

The course picks up from where CS 201 left by discussing concepts related to algorithmic efficiency on basic abstract data types and some sorting algorithms that utilize recursion. Then, the course introduces the abstract data types of trees, tables, priority queues, and graphs, and shows how one can implement them in C++ using fundamental data structures by emphasizing run-time complexity analysis. Credit units: 3 ECTS Credit units: 6, Prerequisite: CS 201.


  1. Frank M. Carrano and Timothy Henry, Data Abstraction and Problem Solving with C++: Walls and Mirrors, any edition, Pearson, 2013 or newer (textbook, ebook).
  2. Harvey M. Deitel and Paul J. Deitel, C++ How to Program, any edition, Prentice Hall, 2011 or newer (recommended).
  3. Mark A. Weiss, Data Structures & Algorithm Analysis in C++, 3rd edition, Addison Wesley, 2006 (recommended).

Grading: There will be homeworks (30% - probably 4-5 homeworks), quizzes (10%), one midterm exam (30%) and a final exam (30%).

Midterm and final exams are closed notes, closed book.

Passing Grade: No predetermined grade to pass the course.

FZ Policy: In order to be able to take the final exam, a student must

Note that the homeworks are worth 30%. Assuming that we will assign 4 homeworks, each are worth 7.5%, therefore the first 3 homeworks add up to 22.5%. Therefore the first rule above requires 0.4 * (10% + 30% + 22.5%) = 25% total;  and the second rule requires 22.5% * 0.3 = 6.75% for homeworks.

Otherwise, the student will receive the FZ grade.

Attendance: Due to the YÖK (Higher Education Council) regulations, we are taking attendance and will report it to the Department at the end of the semester. But attendance has no direct effect on grades & FZ.

Advice: When you are in doubt, ask. Use office hours. If you cannot visit us during office hours, you can always ask questions or arrange meetings by e-mail. Study regularly for the course and attend classes. Do your assignments on time and pay attention to the instructions for submitting assignments. Always make sure that the code you submitted does compile and run correctly.

Related Links:

Homeworks: Homework assignments will be posted on this page and on Moodle. Assignments are expected to be turned in by 23:55 on the due date. You should upload your solutions to the homework assignments using Moodle before the deadline. All programming assignments should be tested on the dijkstra server. Any code that fails to compile or run on dijkstra will receive a zero grade. For the late submissions, each student will be given two grace days for each homework assignment (with no deduction of points). If no submission is received within two days after the homework deadline, no submission will be accepted for that homework. Please make sure you fully understand the Bilkent University Policy on Academic Honesty (in Turkish) and the Rules and Regulations of the Higher Education Council (YOK) (in Turkish). Cheating and plagiarism on exams and homework assignments will be punished according to these regulations.

Honor code: Read the Honor Code for Assignments here.

Grading Policy

  • Planned Lecture Cancellations

  • The following lectures are canceled.
  • <none yet>

  • Outline (tentative):

    Topic Contents Slides
    Course Introduction
    • Syllabus details
    • Rules & Regulations
    Algorithm Analysis
    • Measuring the Efficiency of Algorithms (Ch. 10 of Carrano-Henry)
    • 1 week


    • Sorting Algorithms and Their Efficiency (Ch. 11 of Carrano-Henry)
    • Sorting animation
    • 2 weeks
    • Binary Search Trees (Ch. 15, 16 of Carrano-Henry)
    • 2 weeks
    • Heaps (Ch. 17 of Carrano-Henry)
    • 2 weeks
    Balanced Search Trees
    • AVL, 2-3, 2-3-4, Red-Black Trees (Ch. 19 of Carrano-Henry)
    • 3 weeks
    slides part 1
    slides part 2
    • Hashing (Ch. 18 of Carrano-Henry)
    • 1 week
    • Graphs (Ch. 20 of Carrano-Henry)
    • 3 weeks


    Important information for exams

    The following is on the cover pages of your midterm and final exams. Most students do not read this *valuable* information, but everyone SHOULD. These rules apply to classworks as well:

    1. Write legibly, and make your answers clear.
    2. Unintelligible answers may fail to receive credit.

    Frequently Asked Questions