0% found this document useful (0 votes)
26 views

281leetcode

Uploaded by

yutaocris610
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

281leetcode

Uploaded by

yutaocris610
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

6/25/24, 8:00 PM EECS 281 F23 (82 unread) | Piazza QA


! This class has been made inactive. No posts will be allowed until an instructor reactivates the class.

note @10  1050 views


Actions

Weekly Practice Problems


Here's a previous note that was shared by a former EECS 281 IA, Nikhil Kanamarla:

By popular demand, I will be releasing a set of practice leetcode problems relevant to the material covered in lab, the NK
150. The best way to get good at free response coding problems on the exam is to practice every week. Of course,
when the exam approaches we will release a whole packet of multiple choice and free response problems for practice.

Dynamic Programming
Leetcode Problem 5: Longest Palindromic Substring
Leetcode Problem 53. Maximum Subarray
Leetcode Problem 62. Unique Paths
Leetcode Problem 63. Unique Paths II
Leetcode Problem 64. Minimum Path Sum
Leetcode Problem 70. Climbing Stairs
Leetcode Problem 91. Decode Ways
Leetcode Problem 121. Best Time to Buy and Sell Stock
Leetcode Problem 122. Best Time to Buy and Sell Stock II
Leetcode Problem 139. Word Break
Leetcode Problem 152. Maximum Product Subarray
Leetcode Problem 198. House Robber
Leetcode Problem 300. Longest Increasing Subsequence
Leetcode Problem 322. Coin Change
Leetcode Problem 435. Non-overlapping Intervals
Leetcode Problem 509. Fibonacci Number
Leetcode Problem 740. Delete and Earn
Leetcode Problem 746. Min Cost Climbing Stairs
Leetcode Problem 1137. N-th Tribonacci Number
Leetcode Problem 1143. Longest Common Subsequence
Leetcode Problem 1770. Maximum Score from Performing M

Graphs/DFS/BFS
Leetcode Problem 547 Number of Provinces
Leetcode Problem 130: Surrounded Regions
Leetcode Problem 733: Flood Fill
Leetcode Problem 695: Max Area of an Island
Leetcode Problem 994: Rotting Oranges
Leetcode Problem 207: Course Schedule
Leetcode Problem 103: Binary Tree Zigzag Level Order Traversal
Leetcode Problem 773: Sliding Puzzle

https://piazza.com/class/llpjnmdwoui4kp/post/10 1/5
6/25/24, 8:00 PM EECS 281 F23 (82 unread) | Piazza QA

Tree 

Leetcode Problem 94: Binary Tree Inorder Traversal


Leetcode Problem 98: Validate Binary Search Tree
Leetcode Problem 100: Same Tree
Leetcode Problem 101: Symmetric Tree
Leetcode Problem 102: Binary Tree Level Order Traversal
Leetcode Problem 103: Binary Tree Zigzag Level Order Traversal
Leetcode Problem 104: Maximum Depth of Binary Tree
Leetcode Problem 105: Construct Binary Tree from Preorder and inorder traversal
Leetcode Problem 108: Convert Sorted Array to Binary Search Tree
Leetcode Problem 114: Flatten Binary Tree to Linked List
Leetcode Problem 116: Populating Next Right Pointers in Each
Leetcode Problem 145: Binary Tree Postorder Traversal
Leetcode Problem 173: Binary Search Tree Iterator
Leetcode Problem 199: Binary Tree Right Side View
Leetcode Problem 366: Find Leaves of Binary Tree
Leetcode Problem 270: Closest Binary Search Tree Value
Leetcode Problem 226: Invert Binary Tree
Leetcode Problem 230: Kth Smallest Element in a BST
Leetcode Problem 236: Lowest Common Ancestor of a Binary Tree
Leetcode Problem 341: Flatten Nested List Iterator
Leetcode Problem 543: Diameter of Binary Tree
Leetcode Problem 572: Subtree of Another Tree
Leetcode Problem 617: Merge Two Binary Trees
Leetcode Problem 703: Kth Largest Element in a Stream
Leetcode Problem 938: Range Sum of BST
Leetcode Problem 965: Univalued Binary Tree
Leetcode Problem 1448: Count Good Nodes in Binary Tree

Hashmap
Leetcode Problem 13: Roman to Integer
Leetcode Problem 3: Longest Substring Without Repeating Characters
Leetcode Problem 49: Group Anagrams
Leetcode Problem 146: LRU cache
Leetcode Problem 266: Palindrome Permutation
Leetcode Problem 380: Insert Design GetRandom O(1)
Leetcode Problem 359: Logger Rate Limiter
Leetcode Problem 1396: Design Underground System
Leetcode Problem 560: Subarray Sum Equals K
Leetcode Problem 170: Two Sum III
Leetcode Problem 953: Verifying an Alien Dictionary
Leetcode Problem 981: Time Based Key-Value Store
Leetcode Problem 387: FInd Unique Character in String
Leetcode Problem 269: Missing Number
Leetcode Problem 73: Set Matrix Zeros

https://piazza.com/class/llpjnmdwoui4kp/post/10 2/5
6/25/24, 8:00 PM EECS 281 F23 (82 unread) | Piazza QA

Leetcode Problem 244: Shortest word distance II 

Leetcode Problem 362: Design Hit Counter


Leetcode Problem 348: Design Tic Tac Toe

Sorting
Leetcode Problem 56: Merge Intervals
Leetcode Problem 49: Group Anagrams
Leetcode Problem 15: 3Sum
Leetcode Problem 217: Contains Duplicate
Leetcode Problem 215: Kth Largest Element in an Array
Leetcode Problem 242: Valid Anagram
Leetcode Problem 253: Meeting Rooms II
Leetcode Problem 268: Missing Number
Leetcode Problem 360: Sort Transformed Array
Leetcode Problem 349: Intersection of Two Arrays II
Leetcode Problem 973: K Closest Points to Origin
Leetcode Problem 426: Convert Binary Search Tree to Sorted Doubly Linked List
Leetcode Problem 435: Non-overlapping intervals
Leetcode Problem 83: Remove Duplicates from Sorted List
Leetcode Problem 75: Sort Colors
Leetcode Problem 1229: Meeting Scheduler
Leetcode Problem 1086: High Five
Leetcode Problem 1710: Max Units on a truck

Binary Search
Leetcode Problem 209: Minimum Size Subarray Sum
Leetcode Problem 167: Two Sum II
Leetcode Problem 287: Find the Duplicate Number
Leetcode Problem 362: Design Hit Counter
Leetcode Problem 209: Minimum Size Subarray Sum

Heap (Priority Queue)


Leetcode Problem 23: Merge K Sorted Lists (hard)
Leetcode Problem 253: Meeting rooms 2 (medium)
Leetcode Problem 347: Top K Frequent Elements (medium)
Leetcode Problem 703: Kth Largest Element in a Stream (easy)
Leetcode Problem 1338: Reduce Array Size to Half (medium)
Leetcode Problem 973: K closest spots to the origin (medium)
Leetcode Problem 1338: Reduce array size in half (medium)
Leetcode Problem 215: Kth Largest Element in an Array (medium)
Leetcode Problem 1338: Reduce Array Size to The Half (medium)

Union-Find
Leetcode Problem 128: Longest Consecutive Sequence (medium)
Leetcode Problem 130: Surrounded Regions (medium)
Leetcode Problem 695: Max area of island (medium)

https://piazza.com/class/llpjnmdwoui4kp/post/10 3/5
6/25/24, 8:00 PM EECS 281 F23 (82 unread) | Piazza QA

Leetcode Problem 547: Number of Provinces (medium) 

Strings
Leetcode Problem 3: Longest Substring without repeating characters
Leetcode Problem 28: Implement strStr()
Leetcode Problem 344: Reverse String
Leetcode Problem 151: Reverse Words in a String
Leetcode Problem 186: Reverse Words in a String 2
Leetcode Problem 443: String Compression
Leetcode Problem 412: Fizz Buzz
Leetcode Problem 884: Uncommon words from two sentences
Leetcode Problem 13: Roman to Integer
Leetcode Problem 14: Longest Common Prefix
Leetcode Problem 539: Minimum Time Difference
Leetcode Problem 680: Valid Palindrome 2
Leetcode Problem 792: Number of Matching Subsequences
Leetcode Problem 953: Verifying an Alien Dictionary
Leetcode Problem 1041: Robot Bounded in a Circle
Leetcode Problem 1047: Remove All Adjacent Duplicates In String
Leetcode Problem 1249: Minimum Remove to Make Valid Parenthesis

Stacks/Queues
Leetcode Problem 232: Implement queue using stacks
Leetcode Problem 1249: Minimum Remove to Make Valid Parenthesis
Leetcode Problem 341: Flatten Nested List Iterator
Leetcode Problem 346: Moving Average from Data Stream
Leetcode Problem 155: Min Stack
Leetcode Problem 234: Palindrome Linked List
Leetcode Problem 1047: Remove all adjacent duplicates in string
Leetcode Problem 341: Flatten Nested List Iterator
Leetcode Problem 362: Design Hit Counter
Leetcode Problem 716: Max Stack

Linked List
Leetcode Problem 2: Add Two Numbers
Leetcode Problem 19, 203: Remove Nth Node from End of List, Remove Linked List Elements
Leetcode Problem 160: Intersection of Two Linked Lists
Leetcode Problem 21 and 23: Merge two sorted lists/merge k sorted lists
Leetcode Problem 92: Reverse Linked List 2
Leetcode Problem 141: Linked List Cycle
Leetcode Problem 237: Delete Node in a Linked List
Leetcode Problem 445: Add Two Numbers II
Leetcode Problem 83: Remove Duplicates from Sorted List
Leetcode Problem 116: Populating next Right Pointers in Each Node

Array
https://piazza.com/class/llpjnmdwoui4kp/post/10 4/5
6/25/24, 8:00 PM EECS 281 F23 (82 unread) | Piazza QA

Leetcode Problem 26: Remove duplicates from a Sorted Array 

Leetcode Problem 27: Remove element


Leetcode Problem 73: Set Matrix Zeros
Leetcode Problem 54: Spiral Matrix
Leetcode Problem 33: Search in Rotated Sorted Array
Leetcode Problem 238: Product of Array Except Self
Leetcode Problem 350: Intersection of Two Arrays 2
Leetcode Problem 88: Merge Sorted Array
Leetcode Problem 11: Container with Most Water
Leetcode Problem 169: Majority Element
Leetcode Problem 284: Peeking Iterator
Leetcode Problem 348: Design Tic-Tac-Toe
Leetcode Problem 11: Container with most water
Leetcode Problem 189: Rotate array
Leetcode Problem 48: Rotate Image
Leetcode Problem 167: Two Sum ||
Leetcode Problem 66: Plus One

#pin

lab lab ∕ hw01 lab ∕ hw02 lab ∕ hw03 lab ∕ hw10 lab ∕ hw09 lab ∕ hw08 lab ∕ hw07 lab ∕ hw06

lab ∕ hw04 lab ∕ hw05

good note 10 Updated 10 months ago by Marwa Houalla (mhoualla)

followup discussions for lingering questions and comments

Start a new followup discussion

Compose a new followup discussion

https://piazza.com/class/llpjnmdwoui4kp/post/10 5/5

You might also like