CS 3100

Data Structures and Algorithms 2

Announcements, Spring 2026

 

 

 

 

 

Mark Floryan (mrf8t@virginia.edu)
Aaron Bloomfield (aaron@virginia.edu)
@github | |

 

Machine Learning

Lecture 20: Thursday, March 26th

  • Office hours
    • TA office hours are Mon through Thu, from 5-9 in Rice 442
    • Prof. Bloomfield’s office hours Mon 10:30-12 and Thu 12:30-2, in Rice 402, but not today (Thu, 3/19)
    • Prof. Floryan’s office hours are Mon 1-2, Tue 9-10, and Wed 12-1 in Rice 203
  • Assignments
    • Nothing due this week; PS7 (DP I) and PA4 (DP) will be out later this week
  • Grades
    • Grades through PS4 and PA1 have been returned
    • We expect PA2, PA3, and PS5 to be back by next Tuesday
  • Regrade concerns?
    • If it’s a PA, then via the dedicated Piazza post
    • If it’s a PS, then submit it through Gradescope within one week
  • CBTF for quiz 3
    • We do not want the early sessions to have a disadvantage, so we are providing more (see last Tuesday’s slide)
    • We will debrief and get feedback on Tuesday
  • Course textbook link is on the Canvas landing page
  • Today we will continue with dynamic programming

Genetic Algorithms

Lecture 19: Tuesday, March 24th (1/2)

  • Office hours
    • TA office hours are Mon through Thu, from 5-9 in Rice 442
    • Prof. Bloomfield’s office hours Mon 10:30-12 and Thu 12:30-2, in Rice 402, but not today (Thu, 3/19)
    • Prof. Floryan’s office hours are Mon 1-2, Tue 9-10, and Wed 12-1 in Rice 203
  • Assignments
    • Nothing due this week; PS7 (DP I) and PA4 (DP) will be out later this week
  • Grades
    • Grades through PS4 and PA1 have been returned
    • We expect PA2 to be back this week
  • Regrade concerns?
    • If it’s a PA, then via the dedicated Piazza post
    • If it’s a PS, then submit it through Gradescope within one week
  • CBTF
    • Most people took the practice quiz
    • Quiz 3 sign-ups are available; see Piazza post @125
    • We do not want the early sessions to have a disadvantage, so we are providing more info on the next slide
  • Course textbook link is on the Canvas landing page
  • Today we will continue with dynamic programming

Quiz 3 format

The questions on quiz 3 are:

  1. Perform Dijkstra’s shortest path
    • Hint: create a table like on slide 14 of the 03-2-DijkstraAndPrim.pdf slide set
  2. Find an MST in a graph (either Kruskal’s or Prim’s)
    • A note about scratch paper: copy the NODES only, and the fill in the edges in the MST
  3. Proofs:
    • Prove optimal substructure of one of the algorithms we have seen (randomly chosen)
    • Prove the greedy choice property of one of the algorithms we have seen (randomly chosen)
    • This will be by proof blocks (given a number of steps of the proof, including incorrect steps, select the correct ones and assemble them in the correct order)
    • 6 possible algorithms: coin change, Dijkstra’s, MST (both Prim’s and Kruskal’s), activity selection, fractional knapsack
  4. Some number (5-10) of true/false questions from a very large question bank

Watson Medical Algorithm

Lecture 18: Thursday, March 19th

  • Office hours
    • TA office hours are Mon through Thu, from 5-9 in Rice 442
    • Prof. Bloomfield’s office hours Mon 10:30-12 and Thu 12:30-2, in Rice 402, but not today (Thu, 3/19)
    • Prof. Floryan’s office hours are Mon 1-2, Tue 9-10, and Wed 12-1 in Rice 203
  • Assignments
    • PS6 (greedy II) was due yesterday; how did it go?
    • PA3 (greedy) is out, due this Friday (March 20th)
    • No PA7 (DP I) released this week, because next week is quiz 3
    • PA4 (DP) is due in 3 weeks, so will be out next week
  • Grades
    • Grades through PS4 and PA1 have been returned
    • We expect PA2 to be back this week
  • Regrade concerns?
    • If it’s a PA, then via the dedicated Piazza post
    • If it’s a PS, then submit it through Gradescope within one week
  • CBTF
    • Wednesday’s practice quiz sessions: a complete failure
    • Thursday’s practice quiz sessions: it (almost) worked
    • On Friday we will release, on Piazza, info about next week’s quiz 3
      • We are waiting until the practice quiz finishes
  • Course textbook link is on the Canvas landing page
  • Today we will continue with dynamic programming

Recipes

Lecture 17: Thursday, March 16th

  • Office hours
    • TA office hours are Mon through Thu, from 5-9 in Rice 442
    • Prof. Bloomfield’s office hours Mon 10:30-12 and Thu 12:30-2, in Rice 402
    • Prof. Floryan’s office hours are Mon 1-2, Tue 9-10, and Wed 12-1 in Rice 203
  • Assignments
    • PS6 is out, and due tomorrow
    • PA3 is out, due this Friday (March 20th)
  • Quizzes 1&2
    • They are graded and returned; see Piazza post @88 about a small curve to make up for the typo
    • Beyond that, we are not expecting to curve the examns
    • Regrades are open for about a week
  • Grades
    • Grades through PS4 and PA1 have been returned
    • We expect PA2 to be back this week
  • Regrade concerns?
    • If it’s a PA, then via the dedicated Piazza post
    • If it’s a PS, then submit it through Gradescope within one week
  • CBTF: next slide; it’s THIS week
  • Course textbook link is on the Canvas landing page
  • Today we will continue with greedy algorithms

CBTF Info

  • We will be using a Computer-Based Testing Facility (CBTF) for the rest of the exams in this course
  • There is a practice exam this week (March 17-19)
    • Everybody has to take it!
    • We are going to “grade” it to practice the auto-grading, but as long as you complete it, you will get full credit (counts as a homework)
      • It is a 50 minute slot, taken in Gilmer 490A
  • To register for a slot, see Piazza post @95
    • As of last night, only 20% of the class has registered
    • If you have a legitimate conflict (out of town, etc.), send an email to the course email
    • Otherwise, there will not be a make-up
  • The current schedule for the practice quiz is:
    • Tuesday, 3/17 - 4 pm, 5:30 pm
    • Wednesday, 3/18 - 4 pm, 5:30 pm, 7 pm
    • Thursday, 3/19 - 2:30 pm, 4 pm, 5:30 pm, 7 pm
  • The real quiz 3 will be next week
    • Wednesday, 3/25 through Friday, 3/27
    • Details to follow later this week

AI Hiring Algorithm

Lecture 16: Thursday, March 16th

  • Office hours
    • TA office hours are Mon through Thu, from 5-9 in Rice 442
    • Prof. Bloomfield’s office hours Mon 10:30-12 and Thu 12:30-2, in Rice 402
    • Prof. Floryan’s office hours are Mon 1-2, Tue 9-10, and Wed 12-1 in Rice 203
  • Assignments
    • PS5 was due yesterday – how did it go?
    • PA3 is out, due next Friday (March 20th)
    • PS6 will be out today
  • Quizzes 1&2
    • They are graded and returned; see Piazza post @88 about a small curve to make up for the typo
    • Beyond that, we are not expecting to curve the examns
    • Regrades are open for about a week
  • Grades
    • Grades through PS2 and PA1 have been returned
    • We expect PS3, PS4, and PA2 to be back this week
  • Regrade concerns?
    • If it’s a PA, then via the dedicated Piazza post
    • If it’s a PS, then submit it through Gradescope within one week
  • CBTF: next slide; it’s NEXT week, not this week
  • Course textbook link is on the Canvas landing page
  • Today we will continue with greedy algorithms

CBTF Info

  • We will be using a Computer-Based Testing Facility (CBTF) for the rest of the exams in this course
  • There is a practice exam next week (March 17-19)
    • Everybody has to take it!
    • We are going to “grade” it to practice the auto-grading, but as long as you complete it, you will get full credit (counts as a homework)
      • It is a 50 minute slot, taken in Gilmer 490A
  • To register for a slot, see Piazza post @95
  • The current schedule for the practice quiz is:
    • Tuesday, 3/17 - 4 pm, 5:30 pm
    • Wednesday, 3/18 - 4 pm, 5:30 pm, 7 pm
    • Thursday, 3/19 - 2:30 pm, 4 pm, 5:30 pm, 7 pm
  • The real quiz 3 will be the following week
    • Wednesday, 3/25 through Friday, 3/27

Google Maps

Lecture 15: Tuesday, March 10th

  • Office hours
    • TA office hours are Mon through Thu, from 5-9 in Rice 442
    • Prof. Bloomfield’s office hours Mon 10:30-12 and Thu 12:30-2, in Rice 402
    • Prof. Floryan’s office hours are Mon 1-2, Tue 9-10, and Wed 12-1 in Rice 203
  • Assignments
    • PS5 is out, due tomorrow (March 11th)
    • PA3 is out, due next Friday (March 20th)
    • PS6 will be out on Thursday
  • Quizzes 1&2
    • They are graded and returned
    • Beyond that, we are not expecting to curve the examns
    • A note about regrades, then they will open up for approximately one week
  • Grades
    • Grades through PS2 and PA1 have been returned
    • We expect PS3, PS4, and PA2 to be back this week
  • Regrade concerns?
    • If it’s a PA, then via the dedicated Piazza post
    • If it’s a PS, then submit it through Gradescope within one week
  • CBTF: next slide; it’s NEXT week, not this week
  • Course textbook link is on the Canvas landing page
  • Today we will continue with greedy algorithms

CBTF Info

  • We will be using a Computer-Based Testing Facility (CBTF) for the rest of the exams in this course
  • There is a practice exam the week after spring break
    • Everybody has to take it!
    • We are going to “grade” it to practice the auto-grading, but as long as you complete it, you will get full credit (counts as a homework)
  • It is a 50 minute slot, taken in Gilmer 490A
  • Login info will be provided right after spring break
  • The current schedule is:
    • 3/17 - 4 pm, 5:30 pm
    • 3/18 - 4 pm, 5:30 pm, 7 pm
    • 3/19 - 2:30 pm, 4 pm, 5:30 pm, 7 pm
  • You will be given a link to a system to register for ONE of those sections
  • Further quizzes in this course will follow a similar pattern
  • More information about this will be posted in Piazza in the next few days

Tech Support Cheat Sheet

Lecture 14: Thursday, February 26th

  • Office hours
    • TA office hours are Mon through Thu, from 5-9 in Rice 442
      • Today: there are OH 5-7, but not 7-9
    • Prof. Bloomfield’s office hours Mon 10:30-12 and Thu 12:30-2, in Rice 402, and start this week
    • Prof. Floryan’s office hours are Mon 1-2, Tue 9-10, and Wed 12-1 in Rice 203, and start this week
    • No OH for some of next week due to exam and the upcoming spring break
  • Assignments
    • PS5 should be out today, due Wednesday after spring break
    • PA3 will be out within a week, due three weeks from tomorrow (Fri, Mar 20)
  • Quizzes 1&2
    • They are graded, but…
    • There was a problem with the second section, and there may be a statistical discrepancy between the grades; we want to get that sorted out before we return the exams
  • Grades
    • Grades through PS2 and PA1 have been returned
    • We expect PS3, PS4, and PA2 to be back right after spring break
  • Regrade concerns?
    • If it’s a PA, then via the dedicated Piazza post
    • If it’s a PS, then submit it through Gradescope within one week
  • CBTF: next slide
  • Course textbook link is on the Canvas landing page
  • Today we will continue with greedy algorithms

CBTF Info

  • We will be using a Computer-Based Testing Facility (CBTF) for the rest of the exams in this course
  • There is a practice exam the week after spring break
    • Everybody has to take it!
    • We are going to “grade” it to practice the auto-grading, but as long as you complete it, you will get full credit (counts as a homework)
  • It is a 50 minute slot, taken in Gilmer 490A
  • Login info will be provided right after spring break
  • The current schedule is:
    • 3/17 - 4 pm, 5:30 pm
    • 3/18 - 4 pm, 5:30 pm, 7 pm
    • 3/19 - 2:30 pm, 4 pm, 5:30 pm, 7 pm
  • You will be given a link to a system to register for ONE of those sections
  • Further quizzes in this course will follow a similar pattern
  • More information about this will be posted in Piazza in the next few days

Good Code

Lecture 12: Thursday, February 19th

  • Office hours
    • TA office hours are Mon through Thu, from 5-9 in Rice 442
    • Prof. Bloomfield’s office hours Mon 10:30-12 and Thu 12:30-2, in Rice 402, and start this week
    • Prof. Floryan’s office hours are Mon 1-2, Tue 9-10, and Wed 12-1 in Rice 203, and start this week
    • No OH for some of next week due to exam and the upcoming spring break
  • Assignments
    • PS4 was due yesterday – how did it go?
    • PA2 is due tomorrow (Friday, Feb 20)
    • PS5 will be out next week, due the week after spring break
  • Grades
    • PS0 and PA1 have been returned
    • PS1 and PS2 should be back today – then we are caught up!
    • PA2 can be graded starting next week
  • Regrade concerns?
    • If it’s a PA, then via the dedicated Piazza post
    • If it’s a PS, then submit it through Gradescope within one week
  • CBTF: we are expecting our first use the week after spring break
    • It’s to get used to the system – as long as you complete it, you will not get a penalty
  • Quizzes 1&2 next Tuesday (Feb 24) in lecture; old quizzes in Canvas’ files
  • Course textbook link is on the Canvas landing page
  • Today we will continue with greedy algorithms

Here to Help

Lecture 11: Tuesday, February 17th

  • Office hours
    • TA office hours are Mon through Thu, from 5-9 in Rice 442
    • Prof. Bloomfield’s office hours Mon 10:30-12 and Thu 12:30-2, in Rice 402, and start this week
    • Prof. Floryan’s office hours are Mon 1-2, Tue 9-10, and Wed 12-1 in Rice 203, and start this week
    • No OH for some of next week due to exam and the upcoming spring break
  • Assignments
    • PS4 is due tomorrow (Feb 18)
    • PA2 is due this Friday (Feb 20)
    • PS5 will be out next week
  • Grades
    • PS0 and PA1 have been returned
    • PS1 should be back today
    • PS2 and PS3 should be back next week
    • PA2 can be graded starting later this week
  • Regrade concerns?
    • If it’s a PA, then via the dedicated Piazza post
    • If it’s a PS, then submit it through Gradescope within one week
  • Quizzes next Tuesday (Feb 24) in lecture; old quizzes in Canvas’ files
  • Course textbook link is on the Canvas landing page
  • Today we will start on greedy algorithms

Coordinate Plane Closure

Lecture 10: Thursday, February 12th

  • Office hours
    • TA office hours are Mon through Thu, from 5-9 in Rice 442
    • Prof. Bloomfield’s office hours Mon 10:30-12 and Thu 12:30-2, in Rice 402, and start this week
    • Prof. Floryan’s office hours are Mon 1-2, Tue 9-10, and Wed 12-1 in Rice 203, and start this week
  • Assignments
    • PS3 was due yesterday – how did it go?
    • PA2 is out, due next Friday (Fri, Feb 20th)
    • PS4 will be out today, due next Wednesday
  • Midterms (aka quizzes): there was some confusion on our end about when
    • Quizzes 1&2 are Tuesday, February 24th, in lecture (the Tuesday before spring break)
    • Quizzes 3&4: we are expecting to move to a CBTF; details to follow
      • If on paper,then they are Thursday, April 9th, in lecture
    • Final: Saturday, May 2nd, from 7pm - 10pm
  • Course textbook link is on the Canvas landing page
  • Today we will continue with divide and conquer

Flow Charts

Lecture 9: Tuesday, February 10th

  • Office hours
    • TA office hours are Mon through Thu, from 5-9 in Rice 442
    • Prof. Bloomfield’s office hours Mon 10:30-12 and Thu 12:30-2, in Rice 402, and start this week
    • Prof. Floryan’s office hours are Mon 1-2, Tue 9-10, and Wed 12-1 in Rice 203, and start this week
  • Assignments
    • PA1 was due last Friday – how did it go?
    • PS3 is out, due tomorrow (Wed, Feb 11th)
    • PA2 is out, due next Friday (Fri, Feb 20th)
    • PS4 will be out Thursday, due next Wednesday
  • Midterms (aka quizzes): there was some confusion on our end about when
    • Quizzes 1&2 are Tuesday, February 24th, in lecture (the Tuesday before spring break)
    • Quizzes 3&4: we are expecting to move to a CBTF; details to follow
      • If on paper,then they are Thursday, April 9th, in lecture
    • Final: Saturday, May 2nd, from 7pm - 10pm
  • Course textbook link is on the Canvas landing page
  • Today we will continue with divide and conquer

Linear Sort

Lecture 8: Thursday, February 5th

  • Office hours
    • TA office hours are Mon through Thu, from 5-9 in Rice 442
    • Prof. Bloomfield’s office hours Mon 10:30-12 and Thu 12:30-2, in Rice 402, and start this week
    • Prof. Floryan’s office hours are Mon 1-2, Tue 9-10, and Wed 12-1 in Rice 203, and start this week
    • All will be posted on the Canvas landing page
  • Assignments
    • PS2 is due tomorrow
    • PA1 is due this Friday
    • Upcoming: PS3 will be released today, PA2 released on Friday
  • Midterms (aka quizzes): there was some confusion on our end about when
    • Quizzes 1&2 are Tuesday, February 24th, in lecture (the Tuesday before spring break)
    • Quizzes 3&4: we are expecting to move to a CBTF; details to follow
      • If on paper,then they are Thursday, April 9th, in lecture
    • Final: Saturday, May 2nd, from 7pm - 10pm
  • Course textbook link is on the Canvas landing page
  • Today we will continue with divide and conquer

Dependencies

Lecture 7: Tuesday, February 3rd

  • Office hours
    • TA office hours are Mon through Thu, from 5-9 in Rice 442
    • Prof. Bloomfield’s office hours Mon 10:30-12 and Thu 12:30-2, in Rice 402, and start this week
    • Prof. Floryan’s office hours are Mon 1-2, Tue 9-10, and Wed 12-1 in Rice 203, and start this week
    • All will be posted on the Canvas landing page
  • Assignments
    • PS1 was due Friday – how did it go?
    • PS2 is due tomorrow
    • PA1 is due this Friday
    • Upcoming: PS3 will be released Thursday, PA2 released on Friday
  • Midterms (aka quizzes): there was some confusion on our end about when
    • Quizzes 1&2 are Tuesday, February 24th, in lecture (the Tuesday before spring break)
    • Quizzes 3&4: we are expecting to move to a CBTF; details to follow
      • If on paper,then they are Thursday, April 9th, in lecture
    • Final: Saturday, May 2nd, from 7pm - 10pm
  • Course textbook link is on the Canvas landing page
  • Today we will continue with divide and conquer

Ineffective Sorts

Lecture 6: Thursday, January 29th

  • PS1 is out and now due this Friday (Jan 30) by midnight
  • PS2 will be out today, and due next Wednesday (Feb 4) by midnight
    • Gradescope submission opens up 72 hours before the due date
  • PA1 is out, due Fri, Feb 6
    • Gradescope submissions are open
  • Midterms (aka quizzes): there was some confusion on our end about when
    • Quizzes 1&2 are Tuesday, February 24th, in lecture (the Tuesday before spring break)
    • Quizzes 3&4 are Thursday, April 9th, in lecture
    • Final: Saturday, May 2nd, from 7pm - 10pm
    • If we use a CBTF, quizzes 3&4 and/or the final may have a different format, time, and location
  • Course textbook link is on the Canvas landing page
  • Office hours
    • TA office hours are Mon through Thu, from 5-9 in Rice 442
    • Prof. Bloomfield’s office hours Mon 10:30-12 and Thu 12:30-2, in Rice 402, and start this week
    • Prof. Floryan’s office hours are Mon 1-2, Tue 9-10, and Wed 12-1 in Rice 203, and start this week
    • All will be posted on the Canvas landing page
  • Today we will continue with graphs

Lecture 5: Tuesday, January 27th

Snow day!

Weird Unicode Math Symbols

Lecture 4: Thursday, January 22nd

  • PS0 was due yesterday – how did it go?
  • PS1 is out and due next Wednesday (Jan 28) by midnight
    • Gradescope submission opens up 72 hours before the due date
    • If you don’t see the course, we need to re-sync the roster; email the course email about this
  • PA1 will be out this Friday, due two weeks later (Feb 6)
  • Midterms (aka quizzes): there was some confusion on our end about when
    • Quizzes 1&2 are Tuesday, February 24th, in lecture (the Tuesday before spring break)
    • Quizzes 3&4 are Thursday, April 9th, in lecture
    • Final: Saturday, May 2nd, from 7pm - 10pm
    • If we use a CBTF, quizzes 3&4 and/or the final may have a different format, time, and location
  • Course textbook link is on the Canvas landing page
  • Office hours
    • TA office hours are Mon through Thu, from 5-9 in Rice 442
    • Prof. Bloomfield’s office hours Mon 10:30-12 and Thu 12:30-2, in Rice 402, and start this week
    • Prof. Floryan’s office hours are Mon 1-2, Tue 9-10, and Wed 12-1 in Rice 203, and start this week
    • All will be posted on the Canvas landing page
  • Today we will continue with graphs

Complexity Analysis

Lecture 3: Tuesday, January 20th

  • PS0 is out in Canvas’ Assignments, and due tomorrow (Wed, Jan 21) by 11:59 pm
    • Gradescope submission opens up 72 hours before the due date
    • If you don’t see the course, we need to re-sync the roster; email the course email about this
  • PS1 will be out Thursday afternoon, due next Wednesday (Jan 28)
  • PA1 will be out this Friday, due two weeks later (Feb 6)
  • Midterms (aka quizzes): there was some confusion on our end about when
    • Quizzes 1&2 are Tuesday, February 24th, in lecture (the Tuesday before spring break)
    • Quizzes 3&4 are Thursday, April 9th, in lecture
    • Final: Saturday, May 2nd, from 7pm - 10pm
    • If we use a CBTF, quizzes 3&4 and/or the final may have a different format, time, and location
  • Course textbook link is on the Canvas landing page
  • Office hours
    • TA office hours are Mon through Thu, from 5-9 in Rice 442
    • Prof. Bloomfield’s office hours Mon 10:30-12 and Thu 12:30-2, in Rice 402, and start this week
    • Prof. Floryan’s office hours are Mon 1-2, Tue 9-10, and Wed 12-1 in Rice 203, and start this week
    • All will be posted on the Canvas landing page

Algorithms

Lecture 2: Thursday, January 15th

  • PS0 is out in Canvas’ Assignments, and due next Wednesday (Jan 21) by 11:59 pm
    • Gradescope submission opens up 72 hours before the due date
  • PS1 will be out next week, due the following Wednesday (1/28)
  • Midterms (aka quizzes): there was some confusion on our end about when
    • Quizzes 1&2 are Tuesday, February 24th, in lecture (the Tuesday before spring break)
    • Quizzes 3&4 are Thursday, April 9th, in lecture
    • Final: Saturday, May 2nd, from 7pm - 10pm
    • If we use a CBTF, quizzes 3&4 and/or the final may have a different format, time, and location
  • Course textbook link is on the Canvas landing page
  • Office hours
    • TA office hours coming soon, and will start next week (we are targeting Mon-Thu, 5pm-9pm); likely in Rice 442
    • Prof. Bloomfield’s office hours TBA, in Rice 402, and start next week
    • Prof. Floryan’s office hours are TBA, in Rice 203, and start next week
    • All will be posted on the Canvas landing page