0% found this document useful (0 votes)
33 views7 pages

CS202-Course Outline

Uploaded by

al.rahs2001
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views7 pages

CS202-Course Outline

Uploaded by

al.rahs2001
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Lahore University of Management Sciences

CS202: Data Structures


Spring 2023
Instructor Dr. Maryam Abdul Ghafoor
Room No. SBASSE 9-G51A
Class Timings 11:00am-12:15pm Mon/Wed
Office Hours 11:30am-12:30pm on Thursdays or by Appointment
Email [email protected]
Telephone 3337
TA Fawaz Ahmed (Head TA), Umair Farooq, Haider Usman, Shanza
TA Office Hours To be Announced on LMS
Course URL (if any) https://lms.lums.edu.pk

Course Teaching Methodology

• Teaching Methodology: Synchronous (Live Lectures)

Course Basics
Credit Hours 3
Lectures Nbr of Lec(s) Per Week 2 Duration 75 mins
Labs Nbr of Lec(s) Per Week None Duration
Tutorials Nbr of Lec(s) Per Week TBA Duration

Course Distribution
Core Yes
Elective No
Open for Student Category All (whoever satisfies the course prerequisite)
Close for Student Category None

Course Description

Data structures are the key abstractions for storing data in computer systems and thus form an essential building block for efficient
algorithms. They are used in the design of a wide variety of applications today including cryptocurrencies (e.g., Bitcoins), search
engines (e.g., Bing, Google), social networking (e.g., Twitter, Facebook), and data processing frameworks for machine learning and
data science (e.g., Spark and Tensorflow). Thus, a sound conceptual understanding of data structures and experience with
implementing them is a highly sought-after skill in the technology industry and beyond. This course introduces the fundamentals of
data structures and aims to provide a deep understanding of how different ways of structuring information in computer systems lead
to different tradeoffs in terms of time and memory. Students will be introduced to analytical tools for comparing different data
structures. The course will augment students’ theoretical understanding with rigorous programming assignments, which form an
essential component of the course.

Course Prerequisite(s)

CS 200 Introduction to Programming

Course Objectives

CO-1 To understand the fundamental tradeoffs in the design of common data structures
CO-2 To introduce tools for analyzing the time and space complexity of data structures and algorithms
CO-3 To provide rigorous ‘hands-on’ experience with implementing different data structures in a programming language
Lahore University of Management Sciences

Learning Outcomes

LO-1 Students will be able to understand the working of basic data structures
LO-2 Students will be able to understand the fundamental tradeoffs in the design of data structures
LO-3 Students will be able to compare the time and space efficiency of different data structures
LO-4 Students will be able to appreciate how changing application requirements can lead to new data structures
LO-5 Students will be able to write programs to efficiently store, retrieve, and manipulate data

Grading Breakup and Policy

Assessment Weightage LO
Assignments 30% LO-1, LO-3, LO-5
Quizzes 35% LO-1, LO-2, LO-3, LO-4 LO-5
Final 35% LO-1, LO-2, LO-3, LO-4, LO-5

This spring, CS202 will be run entirely online. In this section, we detail how exactly each component of the course will operate.

Lectures
• There will be 2 lectures per week over the course of the semester.
• Each lecture will also have a Piazza thread for students to ask questions.

Programming Assignments
Assignments are designed to help students develop an in-depth understanding of the practical aspects of ideas and concepts
presented in the lectures. Their aim is to integrate these ideas into actual working code.
• There will be 4 assignments in the course.
• All assignments are required to be done in C++.
• The primary form of support the students will have for assignments are the office hours we’ll host, and Piazza.
• You are allowed 5 "free" late days during the semester (that can be applied to one or more assignments).
• If you submit your work late for any assignment once your 5 “free” late days are used, the following penalty will be applied:
o 10% for work submitted up to 24 hours late
o 20% for work submitted up to 2 days late
o 30% for work submitted up to 3 days late
o 100% for work submitted after 3 days (i.e., you cannot submit assignment more than 3 days late after you have
used your 5 free late days.

Quizzes
• We will have 8 quizzes in the course but only the best 6 quizzes will be counted towards your grade. An important purpose of
having N-2 quizzes is to account for all issues (e.g., Internet connectivity, electricity outage, sickness, etc) that may prevent
you from taking the quiz. No request for a makeup quiz will be entertained if you miss up to 2 quizzes irrespective of the
reason. In the exceptional situation in which you end up missing more than 2 quizzes, we will consider a makeup quiz only if
there is a valid justification. In that case, we reserve the right to determine the mode of the quiz, which may be oral or
textual.
• All quizzes will take place during class timings and will be 10-15 mins in duration
• All quizzes will be announced (see schedule below for the quiz dates)
• The syllabus for every quiz will include everything covered before the lecture in which the quiz will be taken
Ungraded Homeworks
• There will be 4 ungraded homeworks to help you practice with the course material (please see the schedule below for the
homework release dates)

Office Hours
• We’ll be dividing the class into groups, each of size ~20-25 students. Each group will be assigned one primary TA, who will
be responsible for guiding and helping students especially during office hours and one secondary TA, who should only be
contacted if the primary TA is not available.
Exam
There will be no midterm exam in the course. We will just have a final exam, which will be conducted synchronously.
Lahore University of Management Sciences

Academic Honesty
We believe that most students can distinguish between helping other students understand course material and cheating (if in doubt
ask the course staff!). Explaining a subtle point from lecture or discussing course topics is an interaction that we encourage. However,
all coursework must be completed individually and independently unless explicitly stated otherwise. We have various methods of
detecting cheating – so please don’t do it! We also ask that you do not post your assignment solutions publicly.

Any instance of academic dishonesty in this course (intentional or unintentional) will be dealt with swiftly and severely. Potential
penalties include receiving a failing grade on the assignment in question or in the course overall and forwarding of the case to the
disciplinary committee. For further information about this, please make yourself familiar with the relevant sections of the LUMS
student handbook.

We understand that deadlines can be stressful, and when under severe pressure, it can become tempting to start rationalizing actions
that you would otherwise consider clearly inappropriate. Perhaps you’ll find yourself attempting an online quiz, or facing an
assignment deadline, and under all this pressure you’ll convince yourself that you’re just going to cheat for the moment so you can
get the points. This is a terrible idea! Obviously, it is important to learn how to deal with deadlines, but far more important than
that, resorting to cheating is going to do some damage to your moral compass. Someday, when the consequences are higher than
potentially losing a 1/5th of a letter grade, you may find yourself committing dishonest acts at the cost of someone else’s livelihood
or life.

Some general points


• You are encouraged to discuss problems and ideas, but the final solution must be yours
o Never have someone else’s code in your possession at any time
o Never give anyone your code
o Do not copy code from the Internet
o If in doubt, talk to the course staff
• All programming assignments must be completed individually
o May discuss understanding of problem statement and a general sketch of approach
o May not discuss details of solution
o May not show your solution to others (this year or in future years)
o May not look at others’ solutions (this year or from past years)
• We use code comparison software
o Immune to obfuscation
o Produces color-coded all-student-pairs code comparisons

Cheating besides being unethical also has many profound negative consequences:
• It takes away your opportunity for learning and lowers your confidence
• You’d never get this time back!
• Negatively impacts your colleagues

Rather than copying someone else’s work, ask for help. The entire course staff is here to help you succeed. If you invest the time to
learn the material and complete the assignments, you won’t need to copy any answers.

We want you to succeed!

SSE, LUMS and particularly this class, is a harassment free zone. There is absolutely zero tolerance for any behaviour that is intended
or has the expected result of making anyone uncomfortable and negatively impacts the class environment, or any individual’s ability
to work to the best of their potential. In case a differently-abled student requires accommodations for fully participating in the course,
students are advised to contact the instructor so that they can be facilitated accordingly.

If you think that you may be a victim of harassment, or if you have observed any harassment occurring in the purview of this class,
please reach out and speak to me. If you are a victim, I strongly encourage you to reach out to the Office of Accessibility and
Inclusion at [email protected] or the sexual harassment inquiry committee at [email protected] for any queries, clarifications,
or advice. You may choose to file an informal or a formal complaint to put an end of offending behavior. You can find more details
regarding the LUMS sexual harassment policy here. To file a complaint, please write to [email protected].

SSE Council on Equity and Belonging

In addition to LUMS resources, SSE’s Council on Belonging and Equity is committed to devising ways to provide a safe, inclusive and
respectful learning environment for students, faculty and staff. To seek counsel related to any issues, please feel free to approach
either a member of the council or email at [email protected]
Lahore University of Management Sciences

Makeup Policy
• Please refer to Student Handbook 2019-20, page 37, article 25, titled “Makeup Policy for Graded Instruments”.
• “In case N-X policy is implemented for an instrument having multiple sub instruments then petitions will not be accepted
for that instrument”.

Examination Detail
Midterm Exam Yes/No: No
Yes/No: Yes
Combine Separate:
Final Exam Duration:
Exam Specifications:

Code of Conduct
1. All quizzes will be announced (in fact, they have already been specified in the schedule below).
2. All assessments including quizzes and the final exam will be timed. Make sure that you are able to start them on time.
Lahore University of Management Sciences
Lec Topics Assessments

1 Overview: Data Structures, Abstract Data Types, and Applications


• What are data structures? Why do they matter?
• What are abstract data types? How do they relate with data structures?
• Applications of data structure

Module-1: Analysis Tools and Linear Data Structures

2 Analysis Tools: Experimental Analysis, Asymptotic Notation


• How can we analyze the efficiency of algorithms and data structures they use?
• What is experimental analysis? What is asymptotic analysis? How do they compare?

3 Asymptotic Analysis and Arrays


• Big-O analysis
• How can we realize the List abstract data type?
• What are the pros and cons of using arrays?

4 Lists and Stacks


• Singly and doubly linked lists QUIZ-1
• Implementing a Stack ADT (Last-In First-Out ordering) HW-1 Release: 27th Jan
• Analysis and practice

5 Queues, Practice PA-1


• Implementing a Queue ADT (First-In First-Out ordering) Release: 3rd Feb
• Analysis and practice Due: 18th Feb

Module-2: Trees, Binary Search Trees, and M-ary Trees

6 Trees and Tree Traversals


• What is a tree? What are rooted trees?
• How can we systematically traverse a tree? (inorder, preorder, postorder)

7 Tree Traversals and Binary Trees


• Level-order traversal QUIZ-2
• Representing binary trees
• Analysis of binary trees (e.g., relationship between number of nodes and height of a tree)

8 Binary Search Trees (BST): Basics, BST Analysis


• What are BSTs?
• BST operations: search and insertion
• How can we implement a BST?

9 BSTs and Balanced BSTs Trees


• Deletions in BSTs
• What are AVL trees? Height-balance property and analysis of AVL trees

10 AVL Trees PA-2


• Single and double rotations Release: 22th Feb
• Impact on insertion and deletion operations Due: 8th Mar
*Does not coincide with the lecture day
QUIZ-3

11 B+ Trees
• Towards m-ary trees HW-2 Release: 26th Feb
• What are B+ trees? Why do we need them?
• B+ tree operations

Module-3: Hash Tables, Priority Queues, and Heaps


Lahore University of Management Sciences

12 Hash Tables: Hash Functions, Chaining


• What are hash tables? What are hash functions?
• Hash tables with chaining
• Analysis of hash tables

13 Hash Tables: Open Addressing QUIZ-4


• Hash tables with open addressing
• Linear probing and double hashing

14 Priority Queues and Heaps


• How can we implement a priority queue?
• What are heaps?
• Heap operations

Module-4: Sorting and Data Compression

15 Sorting: Insertion Sort, Selection Sort, and Mergesort PA-3


• How can we implement basic sorting algorithms? Release: 19th Mar
• What is the impact of data structures on the efficiency of sorting algorithms? Due: 2nd Apr

16 Sorting: Quicksort, External Sort


• Quicksort and pivot selection QUIZ-5
• Sorting big data

17 Sorting: Lower Bound on Sorting, Bucket-Sort, Radix-Sort (optional)


• Bounds on comparison-based sorting
• Linear-time sorting

18 Data Compression: Applications, Huffman Coding


• Applications of data compression HW-3 Release: 26th Mar
• Huffman coding

19 Tries: Standard, Compressed, Suffix Tries


• Efficient prefix search QUIZ-6
• Understanding tries
• Types of tries

Module-5: Graphs and Applications

20 Graphs: Basics, Data Structures for Graphs


• What are graphs? What is the difference between directed and undirected graphs?
• What are some basic graph data structures (e.g., adjacency lists, adjacency matrices)

21 Graph Traversals: Depth First Search, Breadth First Search


• How can we systematically traverse a graph?
• How can we solve different problems on graphs using graph traversals?

22 Weighted Graphs: Directed Graphs, Connected Components QUIZ-7


• How do we represent weighted graphs? PA-4
• What are connected components? Release: 9th Apr
Due: 23rd Apr

23 Weighted Graphs: Minimum Spanning Trees


• What are spanning trees?
• How can find the minimum spanning tree in a graph?

24 Weighted Graphs: Topological Sort


• What is topological sort?
• What are some ways to determine the topological sort of vertices in a graph?
Lahore University of Management Sciences

25 Shortest-Path Algorithms
• When is the shortest-path well-defined? QUIZ-8
• How can we find shortest paths in a graph? What is the impact of the choice of data
structures on the complexity of shortest-path algorithms?
• Understanding Dijkstra’s algorithm

Module-6: Advanced Topics and Review

26 Advanced Data Structures


• Distributed Hash Tables HW-4 Release: 16th April
• Bloom Filters

27 Advanced Data Structures


• Parallel Algorithms (Work and Span)
• Moore’s Law and Amdahl’s Law

28 Final Review
• Course Review
• What’s Next?

Textbook(s)/Supplementary Readings
Data science is a relatively new and rapidly evolving field and there is no single ideal textbook for this subject. Following are
recommended readings:

I. Data Structures and Algorithms in C++, 2nd Edition (Michael T. Goodrich, Roberto Tamassia, David M. Mount)
The textbook for CS202 (Spring 2021)

II. Data Structures and Algorithm Analysis in C++, Fourth Edition (Mark Allen Weiss)
(Optional) Provides a detailed introduction to data structures and algorithms

III. The Algorithm Design Manual, 3rd Edition (Steve S. Skiena)


(Optional) A good reference for algorithms and problem solving

Visualizing Data Structures


• https://visualgo.net/en
• https://www.cs.usfca.edu/~galles/visualization/Algorithms.html

Some Useful Code Editors


• Visual Studio Code (VSCode)
• Sublime Text

You might also like