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

Computer Science 302
Data Structures
Fall 2018
Assignments and Lecture Topics

Revised December 7, 2018

Monday, August 27, 2018
We will begin immediately with Asymptotic complexity.
We will discuss "big O" notation, and why it is important.
I will spend some time discussing complex numbers, for the first programming assignment .
The assignment has been updated, fixing a small error, giving more specific instructions, and showing a sample run.
There will be a very short quiz, where you will write a 4-line C++ program: enter two integers and print the sum.
Wednesday, August 29, 2018
Addendum to today's lecture.
Monday, September 3, 2018
Labor Day Recess
Wednesday, September 5, 2018
Friday, September 7, 2018
Email your solution to Assignment 1 to the graduate assistant, Shradha Kapoor, at kapoos1 "at" unlv "dot" nevada "dot" edu, by midnight tonight.
The assignment has been updated, fixing a small error, giving more specific instructions, and showing a sample run.
Please write "Larmore" as a comment somewhere within each piece of you code you submit because Miss Kapoor is the TA for two sections of CS 135, and she needs to be able to decide which section you are in.
Some Hints
Monday, September 10, 2018
Here are those files for Array and Linked List implementation of Stack.
Array implementation
Linked LIst implementation
Tuesday, September 11, 2018
Important! Since yesterday morning, I have been unable to edit my web pages from home since both faculty.egr.unlv.edu and student.egr.unlv.edu are down. I can still edit those pages from my office, and you can still view them. They're working to fix the problem, but it might take a while.
Wednesday, September 12, 2018
Because people forgot their names, used a machine other than bobby, or even forgot to include the code in their email, please resubmit Assignment 1 today. No penalty, unless you don't send it today.
  1. Submit the assignment using your unlv mailing id only. Compose your mail from the mailbox.
  2. Submit to the graduate assistant, Shradha Kapoor at kapoos1 "at" unlv "dot" nevada "dot" edu, by midnight tonight.
  3. Make sure that the submission files are being sent as an attachment with the email.
  4. Please do not forget to put the subject of your email as:
    CS302 Larmore Assignment1, Your Name
Friday, September 14, 2018
I will be holding extra office hours today starting aroud 8:00 AM and ending sometime before noon.
Monday, September 17, 2018
Assignment 2 Due in class today.
I will be holding extra office hours today starting at 2:30 PM and ending at perhaps 2:45.
log*
Wednesday, September 19, 2018
Work Assignment 3 by 11:30 today, but do not turn it in.
Examination today.
Practice Exam
Thursday, September 20, 2018
The tests are graded.
Possible score: 150
25 percentile score: 70
50 percentile score: 85
75 percentile score: 94
Average score: 84
Highest score: 125

Wednesday, September 26, 2018
Read Implemention of Data Structures.
Friday, September 28, 2018
Email your solution to Assignment 4 to the graduate assistant, Shradha Kapoor, at kapoos1 "at" unlv "dot" nevada "dot" edu, by midnight tonight.
big graph
small graph
A much larger graph with 999 vertices. Use 0 as the start vertex.
Output using the small graph
The first value of kounter is from the construction of the neighbor lists. The second value of kounter is from execution of the BFS algorithm itself.
Wednesday, October 3, 2018
There will be very short quiz today, based on the implementation of a stack as an array, which we dicussed on Wednesday.
19 students took the quiz. Out of a possible 15, the median score was 13.
We will start on hashing.
Friday, October 12, 2018
Email your solution to Assignment 5 to the graduate assistant, Shradha Kapoor, at kapoos1 "at" unlv "dot" nevada "dot" edu, by midnight tonight.
Wednesday, October 17, 2018
Examination today.
Practice Exam
Sunday, October 21, 2018
The tests are graded.
Possible score: 260
25 percentile score: 162
50 percentile score: 185
75 percentile score: 214
Average score: 185
Highest score: 245

Wednesday, October 24, 2018
I will put up the Huffman coding programming assignment today.
Here is the list of frequencies you will use for the assignment.
Friday November 9, 2018
Here is the Huffman coding assignment.
This should be the final version, dated Sun Oct 28 15:04:01 PDT 2018
Here is the list of frequencies you will use for the assignment.
The assignment requires implementing several data structures, as I will explain in the final description of the assignment.
Here is the Huffman tree produced by my program, together with the resulting list of codons
You will need these files.
Previous version give the incorrect codon for T.
Corrected Sun Oct 28 13:49:59 PDT 2018
Tuesday, November 13, 2018
I will be in my office today from 10:45 to 1:00
Wednesday, November 14, 2018
Examination today.
Practice Exam
If you write the code for problem 15, the following values will be computed for F[i] for i = 0 .. 19:
  • F[0] = 1
  • F[1] = 3
  • F[2] = 7
  • F[3] = 11
  • F[4] = 19
  • F[5] = 27
  • F[6] = 39
  • F[7] = 51
  • F[8] = 71
  • F[9] = 91
  • F[10] = 119
  • F[11] = 147
  • F[12] = 187
  • F[13] = 227
  • F[14] = 279
  • F[15] = 331
  • F[16] = 403
  • F[17] = 475
  • F[18] = 567
  • F[19] = 659
  • Saturday, November 17, 2018
    The tests are graded.
    Possible score: 340
    25 percentile score: 195
    50 percentile score: 247
    75 percentile score: 255
    Average score: 229
    Highest score: 295
    Wednesday, November 28, 2018
    Due to an emergency, I will not hold office hours from 1:00 to 2:00 today. I will be in my office from 10:00 to 11:00 as usual.
    Friday, November 30, 2018
    Email your solution to Assignment 7 to the graduate assistant, Shradha Kapoor, at kapoos1 "at" unlv "dot" nevada "dot" edu, by midnight tonight.
    The Assignment 7 page was updated. on Sun Nov 25 12:31:30 PST 2018
    updated. on Fri Nov 30 16:08:48 PST 2018 You don't want to print a million lines, so read this before you submit.
    The big graph is now available.
    Read this file about sparse graphs and shortest path problems .
    Thursday, December 6, 2018
    I will hold office hours today from 8:30 to 11:15 and from 1:00 to 2:00.
    It is now 12:10 and the faculty meeting is over. I'll be in my office until 2:00.
    No one showed up during the morning. If no one shows up in the afternoon, I will conclude that going out of my way to help you is pointless, and so I won't hold any office hours during finals week.

    Someone did come in the afternoon, so I will hold office hours on Monday.
    Monday, December 10, 2018
    I will hold office hours today from 8:45 to to 1:00. If someone comes, I might hold office hours tomorrow at the same time.
    Tuesday, December 11, 2018
    I might hold office hours today from 8:30 to 1:00.
    I don't want to come if no one needs my help, so if you're planning to show up, send me email.
    Wednesday, December 12, 2018 x
    Final Examination. 8:00 to 10:00.
    Practice Exam
    Error in Problems 39 and 40 corrected: Mon Dec 3 13:20:31 PST 2018
    I replaced the function in Problem 5: Wed Dec 5 04:44:58 PST 2018 r s
    Wednesday, January 23, 2019
    I will be teaching CS 477 8:30 -- 9:45 MW and CS 456 11:30 -- 12:45 MW during the Spring 2019 Sememster.

    Back to Course Page