Schedule - CS 314 - Fall 2026 - Note, this is the preliminary schedule and subject to change.

Readings are from Building Java Programs 5th Edition, Author Reges and Stepp, ISBN: ISBN-13: 978-0135471944. Abbreviated as BJP5 below.

All programming assignments are due by 11 pm on the date indicated.

All slides in PDF 4 Up Format. (Large file! 180+ pages) Do not print this in the CS labs!

All slides in PDF Format. Many, Many Pages!! Do not print in the CS labs!!

Co-study sessions date, time, and location TBD (To Be Determined). Co-study is an extra problems solving session with a TA. Same content covered in the two meetings each week. Goal is to understand content NOT to get help on assignments.

Suggested Programming practice problems from LeetCode are listed on most days. These are optional, ungraded problems, to practice using the concept from the given day and / or practice for coding questions on exams. (LeetCode does not contain Object-Oriented problems. The site is geared towards algorithms and data structures.) Programming is not a spectator sport. The best way to learn to program is to program. These problems tend to be a bit more difficult than the coding questions on the exams. For many questions, there is an algorithmic technique that makes the question fairly straight-forward. The downside is if you don't know the technique the solutions tended to spiral into complicated messes of code. Do not worry about how your solution compares to others in times of speed or memory use.

Monday Tues. Wednesday Thur. Friday
8/24 Topic 1: Syllabus and Course Mechanics
Slides: PPT, PDF, PDF 4up

1.Read the course syllabus, topics list, and schedule. Browse class materials on class web site.

Topic 2: Algorithm Analysis
Slides: PPT, PDF, PDF 4up

1. BJP5 13.2
2. Another explanation of Big O.
3. BJP5 Self check exercises: 9, 10, 11, 12
4. LeetCode problem: TwoSum. Do not use any additional data structures (new array, map, set, list) in your solution other than the two element array returned if a solution is found.


No discussion sections today.
8/25 8/26 Topic 2: Algorithm Analysis continued
1. Video: complexity and efficiency
2. BJP5 Self check exercises: 13, 14, 15
3. LeetCode problem: Longest Common Prefix. Do not use any additional data (new array, map, set, list) in your solution.


Syllabus Quiz Due on Canvas
8/27
8/30 Topic 3: Encapsulation - IntList

Slides: PPT, PDF, PDF 4up

1. BJP5  15.1
2. The Java Tutorial online. Lesson: Object-Oriented Programming Concepts. Read the following two topics: What is an Object? What is a Class?
3. BJP5 Exercises 1 lastIndexOf, 3 replaceAll
4. LeetCode problem: Remove Element. Another array problem.

Background Survey Due on Canvas

8/31  Topic 3: Encapsulation - IntList

1. BJP5  15.2, 15.3 only section on resizing, 15.4, and 10.1
2. The Java Tutorial online. Lesson: Objects. Read the page on Objects and the sub pages on Creating Objects and using Objects.
3. The Java Tutorial online. Classes. Read all the subtopics of in the Classes section.
4. LeetCode Problem: Plus One. (Complete in place, meaning no new array or other data structure, unless the result is one digit longer. Then use System.arraycopy or Arrays.copyOf)

Discussion Sections meet - Section Quiz 1 (Algorithm analysis) 

9/1
Co-Study session. 5 - 6:30 pm. GDC 1.304
9/2   Topic 3: Encapsulation - IntList

1. BJP5 10.1
2. LeetCode Problem: 3Sum. Try the obvious O(N^3) solution. It will timeout on the longer test cases. Note, the Collections.sort() method is helpful in simplifying your code.

Academic Integrity Quiz due on Canvas. (You must get a perfect score or grade will be set to 0. You can take as many times as you like.)

9/3
Program 1 due
9/4 Topic 4: Inheritance -  SortedIntList
Slides: PPT, PDF, PDF 4up

1. BJP5 9.1, 9.2, 9.4
2. Video: Inheritance and super classes
3. LeetCode Problem: RemoveDuplicatesFromSortedArray. Yet another array problem.

9/7  Labor Day Holiday - UT Closed

No class, discussion sections, co-lab study or help hours.
9/8
Co-Study session. 5 - 6:30 pm. GDC 1.304
9/9  Topic 4: Inheritance -  SortedIntList

1. The Java Tutorial online. A more detailed look at inheritance. Read this page and all the following sub topics: Overriding and Hiding Methods, Hiding Fields, Using the Keyword super, and Object as a Superclass.

Start Topic 5: Polymorphism PPT, PDF, PDF 4up

1. LeetCode Problem: Toeplitz Matrix. In honor of assignment 2. (Named after Otto Toeplitz.)

9/10
Program 2 due

9/11  Topic 5: Polymorphism, GenericList  Slides: PPT, PDF, PDF 4up

1. BJP5 9.3, 10.1
2. Video: Polymorphism
3. Practice ArrayList questions: 10.4 doubleList, 10.10 removeInRange, 10.15 filterRange
4. LeetCode problem: (nothing to do with polymorphism sadly, just an interesting question) : Zigzag conversion. Some folks find this tricky if you have never done a problem like it before. You may find it VERY helpful to draw out some examples and look for patterns for the next character index if we are building the resulting String in row-major order.

9/14  Topic 6: Java Generics
Slides: PPT, PDF, PDF 4up

1. BJP5 10.1, 11.1, 15.4
2. An explanation of the Java Collections Framework.
3. The Java tutorial online. Generics. Read the Introduction and the section on Defining Simple Generic Types.

Discussion Sections meet - Section Quiz 2 (Polymorphism and Inheritance, Array based Lists)
9/15
Co-Study session. 5 - 6:30 pm. GDC 1.304
9/16 Topic 7: Interfaces
Slides: PPT, PDF, PDF 4up

1. BJP5 9.5, 11.1
2. Video: Interfaces
 

 

 

9/17
Program 3 due

9/18  Topic 8: Iterators
Slides: PPT, PDF, PDF 4up

1. BJP5 11.1, 15.3 section on adding an Iterator.
2. Video: Implementing Comparable
3. Nested Classes. Read the main entry on Nested Classes and the subtopic on Inner Class Example.
4. LeetCode Problem: Peeking Iterator. Iterators and Encapsulation! The code is actually fairly simple.

9/21   Topic 9: Abstract Classes
Slides: PPT, PDF, PDF 4up

1. BJP5 9.6
2. The Java Tutorial online. Abstract Methods and Classes

 

Discussion Sections meet - Section Quiz 3 (New Data Structures)

Co-Study session. 5 - 6:30 pm. GDC 1.304

Exam 1 Review with Mike 7 - 8  pm via Zoom  - Link on Canvas

9/22
Co-Study session. 5 - 6:30 pm. GDC 1.304

9/23  Topic 10 - Maps
Slides: PPT, PDF, PDF 4up

1. BJP5 11.3, 11.2
2. The Java Tutorial online, the Map Interface.
3. Practice it Problems: 11.13 isUnique, 11.4 intersect
Slides: PPT, PDF, PDF 4up
1. Video: Maps
2. LeetCode problem: TwoSum, redo your solution, but use a Map<Integer, Integer> to speed up your solution.

Exam 1 Tentative Date

9/24

9/25   Topic 10 - Maps

1. LeetCode problem: majorityElement. Use a map to help solve the problem. (Note, Professor Emeritus J Moore found an O(N) solution with a Stack. He considers it one of his best ideas.)
9/28  Topic 11: Linked Lists
Slides: PPT, PDF, PDF 4up

1.  BJP5 16.1, 16.2
2. Video: Linked List Nodes
3. Video: Linked List Traversal
4. LeetCode problem: Remove Duplicates from Sorted List. (temp != null || temp.next != null? Which one, which one???)

No discussion sections today

9/29 9/30 Topic 11 Linked Lists

1. BJP5 16.3, 16.4, 16.5
2. Video Complex Linked List
3. LeetCode Problem: Linked List Random Node. (Classic Time vs. Space, although there is a clever solution that is both relatively fast and is O(1) extra space.)

 

10/1
Program 4 due
10/2 Finish Topic 11 - Linked Lists

1. LeetCode Problem: Remove Linked List Elements. (Classic)
10/5 Topic 12: Recursion
Slides: PPT, PDF, PDF 4up

1. BJP 12.1, 12.2, 12.3, 12.4
2. Video: Recursive Tracing
3. Video: Recursive Functions
4. LeetCode Problem: Power of Two. (Implement a recursive solution. Typical solutions have 2 base cases.)

Discussion sections meet - Exam 1 returned in section.

10/6
Co-Study session. 5 - 6:30 pm. GDC 1.304
10/7  Finish Topic 12: Recursion
1. Video: Implementing a Recursive Method
2. LeetCode Problem: Reverse Linked List. Another classic. Try to do this recursively.

10/8
Program 5 due
10/9   Topic 13: Recursive Backtracking
Slides: PPT, PDF, PDF 4up

1. BJP5 12.5, 12.6
2. LeetCode Problem: Matchsticks to Square. (Try following the classic recursive backtracking algorithm with a helper method. Likely will time out. Then think about some preprocessing before the recursion starts to recognize data sets that simply cannot lead to a solution and return false. Lots of interesting optimizations that can be made inside the recursive backtracking code.)

10/12  Finish Topic 13: Recursive Backtracking
1. Another explanation of recursive backtracking.
2. The 8 queens puzzle at Wikipedia.
3. the knapsack problem at Wikipedia
4. LeetCode Problem: Combination Sum. (Try a recursive backtracking solution. Create a helper method similar to finding all solutions to N queens. Use a data structure to store all valid results and data structure with current result. Deal with one number at a time. Choices are use it if "works" and don't use it all.)

Discussion Sections meet - Section Quiz 4 (Recursion)
10/13
Co-Study session. 5 - 6:30 pm. GDC 1.304
10/14  Topic 14: Searching, Simple Sorts
Slides: PPT, PDF, PDF 4up

1. BJP5 13.3
2. Video: Binary Search
3. Video: Sorting
4. LeetCode problem: SearchInsertPostion. Note, this is  just binary search as discussed in class. See if you can implement binary search without referring to any other code.

 

10/15
Program 6 due

 

10/16  Topic 15: Stacks
Slides: PPT, PDF, PDF 4up

1.BJP5 14.1, 14.2, 14.3
2. Video Stack basics
3. LeetCode Problem: isValid. Use a Java Stack or Dequue to store opening symbols.

10/19 Topic 16: Queues
Slides: PPT, PDF, PDF 4up

1.  BJP5 14.3. 14.4
2. Video: Queue basics
3. Video: Stack / Queue Advanced
4. LeetCode Problem: Implement Queue Using Stacks. Use the built in Java Stack class and only use the empty, peek, pop, and push methods of the Stack. Note, you can and should use 2 stacks and strive to make all ops amortized O(1).

Discussion Sections meet - Section Quiz 5 (More Recursion)

10/20
Co-Study session. 5 - 6:30 pm. GDC 1.304

10/21  Topic 17: Quicksort and Mergesort
Slides: PPT, PDF, PDF 4up

1. BJP5 13.1, 13.4
2. Video: sorting
3. Sorting articles at Wikipedia: Quick sort, Merge sort
4. LeetCode Problem: Merge Sorted Arrays. Implement the merge algorithm as presented in class. Attempt to do it without the aid of notes. Note, much easier when you make a copy of the original values in nums1 in an array of length n.

 

10/22
Program 7 due
10/23  Topic 18: Binary trees
Slides: PPT, PDF, PDF 4up

1. BJP5 17.1, 17.2, 17.3
2. Video: Binary Tree Traversal 1
3. Video: Binary Tree Traversal 2
4. LeetCode Problem. Same Tree. Recursion is your friend.
5. LeetCode Problem. Construct Binary Tree from Preorder and Inorder Traversal. This is an order of magnitude harder than most suggested problems. Hint. Think about keeping track of the low and high indices of values we know are in a tree, which may be a subtree of the overall tree. Some similarity to binary search or quicksort. (Not that we are sorting or searching.)

10/26  Topic 19: Binary search trees
Slides: PPT, PDF, PDF 4up

1. BJP5 17.4, 17.5
2. Video: Complex Binary Tree Ops
3. LeetCode Problem: Convert Sorted Array to Binary Search Tree. Great problem.

Discussion Sections meet - Section Quiz 6 (Linked List Review)

Exam 2 Review with Mike 7 - 8 pm via Zoom  - Link on Canvas

10/27
10/28  Finish Topic 19: Binary search trees

1. LeetCode Problem: Validate Binary Search Tree.

Exam 2 Tentative Date

10/29
No Help Hours Today Due to Exam Grading

10/30  Topic 20: Red - Black Trees
Slides: PPT, PDF, PDF 4up

 1. LeetCode Problem: Balanced Binary Tree.

11/2  Topic 21: Huffman Coding
Slides: PPT, PDF, PDF 4up

1. LeetCode Problem: (Not a Huffman Tree or encoding problem) Minimum Depth of Binary Tree. (Note, the tree is binary tree, but not a binary search tree AND duplicates are allowed. Hint, do a level order traversal using a queue and stop at the first leaf.)

No discussion sections today
11/3

11/4  Topic 21: Huffman Coding

1. LeetCode problem. Path Sum. (Again, not a Huffman Coding Tree problem, but great practice for exam 3.)

 

11/5
Program 8 due

11/6  Topic 22: Graphs
Slides: PPT, PDF, PDF 4up

1. Graphs at Wikipedia
2. LeetCode Problem: Find if Path Exists in Graph

11/9 Topic 22: Graphs

1. LeetCode Problem: Clone Graph


Discussion Sections meet: Exam 2 returned and reviewed in discussion section.

11/10
11/11 Topic 22 Graphs

1. LeetCode Problem. Find Center of Star Graph. Bit of a trick question as there is a simple, O(1), solution.

11/12
Program 9 due

11/13 Topic 23: Hash Tables
Slides: PPT, PDF, PDF 4up

1. BJP5 18.1
2. Video: Hashing
3. LeetCode Problem: Happy Number. Use a HashSet to track the numbers we have seen so far in the sequence.

11/16 Topic 23 Hash Tables

1. LeetCode Problem: Longest Consecutive Sequence. Place all values in HashSet initially. Iterate through HashSet. If value -1 is in HashSet ignore (not start of sequence), otherwise value is start of sequence. See how long it is.

Discussion Sections meet - Section Quiz 7 (Encoding)

11/17

11/18  Topic 24: Tries
Slides: PPT, PDF, PDF 4up

Last day to Q-drop classes

11/19
Program 10 due
11/20  Topic 25: Heaps
Slides: PPT, PDF, PDF 4up

1. BJP5 18.2
2. Video: Heaps
1. LeetCode Problem: Maximum Product of Two Elements in Array. Akin to the Evil Hangman second hardest pattern problem. Implement a solution that uses a Java PriorityQueue. Create a class that implements the Comparator interface to put the larger Integer objects at the front of the PriorityQueue.

11/23 Fall and Thanksgiving Break Break. No class, sections, or help hours this week.

11/24 11/25

11/26

11/27

11/30 Topic 26: Dynamic Programming
Slides: PPT, PDF, PDF 4up

1. LeetCode Problem: Best Tine to Buy and Sell a Stock. Classic technical interview question. It is DP, but you don't need an auxiliary data structure, just variables to track max profit so far and lowest price so far.

Discussion Sections meet - Section Quiz 8 (Trees)
12/1
12/2  Topic 26: Dynamic Programming

1. LeetCode Problem: Maximum Subarray. Like most valuable subplot from assignment 1, Code Camp, but simpler with a 1D array. Discover Kadane's Algorithm, a dynamic programming algorithm.

12/3
Program 11 due.
12/4
Topic 27: Functional Programming in Java
PPT, PDF, PDF 4up
1. BJP5 19.1 - 19.6
12/7   Catch up day. If caught up (no lectures canceled through the semester) in class review for Exam 3. Bring you questions.

Last day of regular help hours

No discussion sections today

12/8
Study Day

12/9 Study Day

12/10 Final Exams start. CS314 Exam 3 date and time TBD. Could be as late as Monday, 12/14, 7 - 10 pm. 12/11
12/14 Last day of UT final exams