THINK FIRST·CODE LATER

CPS 2232 · CPS 2233

Data Structures and Algorithms

Abstract data types, algorithm analysis and design

Questions
499
Labs
32
You answered
0
Correct
0%

Recursion, Generics and Collections

Chapter 1 Week 1
Recursion II: Helper Methods, Backtracking and Memoization

recursive helper methods, recursive binary search, recursion vs iteration, exponential recursion, memoization, backtracking (subsets, permutations, N-Queens), StackOverflowError

0/30 answered
Chapter 2 Week 2
Generics

generic classes, interfaces and methods, diamond <>, bounded types <T extends Comparable<T>>, wildcards ? extends / ? super (PECS), raw types, type erasure

0/30 answered
Chapter 3 Week 2–3
Lambdas, Comparators and Streams

functional interfaces, lambdas, method references, Comparable vs Comparator, Comparator.comparing, streams, collectors, Optional

0/33 answered
Chapter 4 Week 3
The Collections Framework: Lists, Stacks, Queues and Deques

Collection hierarchy, ArrayList vs LinkedList, Iterator/ListIterator, fail-fast iterators, ArrayDeque as stack and queue, PriorityQueue, Arrays.asList, Collections utilities

0/33 answered
Chapter 5 Week 4
Sets and Maps

HashSet, LinkedHashSet, TreeSet, equals/hashCode, Comparator, NavigableMap, HashMap, TreeMap, merge, computeIfAbsent

0/31 answered

Analysis and Design of Algorithms

Chapter 6 Week 5
Algorithm Analysis and Correctness

RAM model, Big-O / Big-Ω / Big-Θ, growth rates, loop analysis, best/worst/average case, space complexity, amortized analysis, loop invariants

0/31 answered
Chapter 7 Week 6
Recurrence Relations and Divide-and-Conquer

recurrences, iteration and substitution, recursion trees, Master theorem, divide-and-conquer, recursive binary search, merge step, counting inversions, maximum subarray, fast exponentiation

0/31 answered
Chapter 8 Week 7
Greedy Algorithms and Dynamic Programming

greedy choice property, interval scheduling, fractional knapsack, Huffman coding, optimal substructure, memoization vs tabulation, coin change, 0/1 knapsack, LCS, LIS, solution reconstruction

0/31 answered
Chapter 9 Week 8
Sorting

insertion sort, mergeSort, quick sort (Lomuto), heap sort, counting/radix/bucket sort, stability, Ω(n log n) lower bound, Arrays.sort

0/32 answered

Implementing Data Structures

Chapter 10 Week 9
Implementing Lists, Stacks and Queues

List ADT, MyArrayList and ensureCapacity, amortized O(1) append, singly and doubly linked lists, Iterator inner classes, array and linked stacks, circular-array and linked queues

0/32 answered
Chapter 11 Week 10
Heaps and Priority Queues

complete binary trees in an array, max-heap and min-heap, sift-up and sift-down, bottom-up buildHeap, heap sort, MyPriorityQueue<E> with a Comparator, top-k and k-way merge, java.util.PriorityQueue

0/31 answered
Chapter 12 Week 11
Binary Search Trees

tree vocabulary, the BST property, search and insert, delete (three cases), pre-/in-/post-/level-order traversal, height and O(h) costs, recursive tree utilities, isBST, a BST iterator

0/31 answered
Chapter 13 Week 12
AVL Trees

height and balance factor, the AVL invariant, LL/RR/LR/RL rotations, rebalancing after insertion and deletion, O(log n) height, red-black trees and TreeMap

0/31 answered
Chapter 14 Week 12–13
Hashing

hash functions and compression, String.hashCode, separate chaining, linear/quadratic probing, double hashing, load factor, rehashing, tombstones, MyHashMap, equals/hashCode, HashMap internals

0/31 answered

Graphs

Chapter 15 Week 13
Graphs and Traversals

graph vocabulary, edge list, adjacency matrix, adjacency lists, BFS, DFS, connected components, cycle detection, bipartite graphs, topological sort, O(V + E)

0/30 answered
Chapter 16 Week 14
Weighted Graphs: Shortest Paths and Spanning Trees

weighted edges, relaxation, Dijkstra's algorithm, predecessor array, negative weights, Bellman–Ford, minimum spanning trees, cut property, Prim's algorithm, Kruskal's algorithm, union–find

0/31 answered
Programming labs

32 problems with model solutions

The kind that appears in the coding section of a midterm, a final or a lab quiz. Write your solution, then compare.