University of Nevada Las Vegas
Howard R. Hughes College of Engineering
Department of Computer Science
My Home Page

Computer Science 302
Introduction to Data Structures
Fall 2018

Revised September 14, 2018

Please look at the Announcements Page every day.

Dr. Larmore
Office, TBE B378-B.
Telephone 702-895-1096. Never leave a voice message on my phone.
Email: lawrence "dot" larmore "at" unlv "dot" edu
Always write "302" somewhere in the subject line of your message.
Office Hours:
10:00-11:00 and 1:00-2:00 Mondays and Wednesdays.
Contacting Me:
It's best to send me email. Be sure to write "302" in the subject field so that I know what the message is about. (I delete lots of messages without reading them, based on the subject fields.)
You may also telephone my office, but do not leave a message.
Please, never try to communicate with me by leaving notes on my door, under my door, or in my mailbox in the department office, as those notes get lost, and I can't retrieve them remotely.
If you ever have to leave me anything physical, such as homework papers, please do not push it under my door or put it in my mailbox. If you can't find me, please give it to one of the staff in the computer science department office in room TBE A211-A.
Graduate Assistant:
Shradha Kapoor
Email: kapoos1 "at" unlv "dot" nevada "dot" edu
Office hours: Mon 1:00 - 2:00, Wed 10:00 - 11:00, Thu 4:00 - 5:00 TBE B346
Days of Instruction:
August 27, 2018 - December 5, 2018.
Time of Instruction:
8:30 - 9:45
Place of Instruction:
SEB 1240
Data Structures and Algorithm Analysis in C++ Third Edition by Mark Allen Weiss
Data Structures and Algorithm Analysis in C++ Fourth Edition by Mark Allen Weiss
CSC 202 (Computer Science II)
MAT 181 (Elementary Calculus I)
Anyone who has not taken all prerequisites and earned a grade of "C" or better in each must see me immediately. I will not hesitate to administratively drop a student who lacks the prerequisites, as unprepared students slow down the class. I will be happy to sign a prerequisite waiver form if you have actually taken the prerequisites but the registration system doesn't know this, such as if you took them at another institution. If you come to see me about this, please bring unofficial copies of your transcripts from that other institution.
First Examination: Wednesday, September 19
Second Examination: Wednesday, October 17
Third Examination: Wednesday, November 14
Final Examination: Wednesday, December 12, 8:00 -- 10:00
There will be hand-written assignments and programming assignments. All programming assignments must be written in C++, must be submitted electronically from your engineering account, and must compile and run on
Additional submission instructions, (Written by Lucas Bang, the graduate assistant during the Fall 2011 Semester.)
You may permit another student to look at your code, but you are forbidden to make a copy of your code available to another student electronically.
If a portion of the code you turn in was obtained from another source (such as a web site) you must give a reference within your code, such as: "This procedure was from"
The grading will be based on examinations and homework. The homework will count much less than the examinations, because I am allowing you to work together on the homework.
However, the examinations will be designed in such a way that if you do not do homework, or if you simply allow others to do it for you, you will not do well on the exams.
Homework and Quizzes: 10%
Mid-term Examinations: 55%
Final Examination: 35%
Topics Covered
  • Mathematical Review.
    • Logarithms (1.2).
    • Efficiency measures (Big-O, etc.). Basics of non-recursive running time analysis (2.1-2.4).
    • Recurrence relations (1.3).
    • Run time of recursive algorithms, master theorem (10.2.1)
  • C++ Review (1.5-1.7)
  • A simple example which represents the course: the maximum subsequence sum problem (2.4.1-2.4.3).
  • Searching and Sorting
    • Linear search.
    • Binary search.
    • Selection sort.
    • Insertion sort (7.2).
    • Bubblesort.
    • Bucket sort (7.10).
    • Lower bounds (7.9) for sorting.
    • Mergesort (7.6).
    • Binary tree sort (my personal favorite).
    • Quicksort (7.7).
    • Polyphase mergesort (7.11.5).
  • Elementary Data Structures.
    • Abstract Data Types (3.1).
    • Lists (3.2).
    • Stacks (3.6).
    • Queues (3.7).
    • Arrays.
  • Binary trees.
    • Preorder, postorder, and inorder traversal (4.1, 4.2, 4.6)
    • Binary search trees (4.2, 4.3).
    • Balanced search trees (4.4, 4.7).
  • Hashing. (5.1-5.5).
  • Heaps (6.1-6.4).
    • Heapsort (7.5).
  • Disjoint set algorithm, union-find (8.1-8.5)
  • Graph algorithms
    • Representing graphs (9.1).
    • Topological sort (9.2).
    • Graph traversal, depth-first and breadth-first search (9.3).
    • Shortest paths (9.3).
    • Kruskal's algorithm (9.5).
  • Algorithm paradigms (10)
    • Greedy algorithms (10.1).
    • Divide and conquer (10.2).
    • Dynamic programming (10.3).
    • Randomized algorithms (10.4).
    • Backtracking algorithms (10.5).
Some Questions to Ask Yourself
  • In your past programming experience, did you used data structues?
    Yes - at the very least, you used the data structures built into the language you used, for example:
    1. integer
    2. boolean
    3. array
  • Did you use any data structures or algorithms from a library?
  • Did you create any data structures or algorithms?
  • Can you be a programmer using only data structures and algorithms available in a library?
    Possibly, but certainly not a very good one.