Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Discussion 2: Leetcode!

Discussion 2: Thursday, May 28, 2026.

This discussion section works through Leetcode-style programming exercises in Rust.

Submit your work on Gradescope.

Part 1: Missing Number

Solve the Missing Number problem on Leetcode.

Hint: consider using a HashMap or a HashSet!

Upload a screenshot of your submission getting accepted on Leetcode to Gradescope.

Part 2: Kth Largest Number

Solve the Kth Largest Element in an Array problem on Leetcode.

Consider using a BinaryHeap — a data structure that allows you to insert and remove elements by their relative order. Here is an example of how to use it.

Upload a screenshot of your submission getting accepted on Leetcode to Gradescope.