Monthly

Subscription

$35/mo

Down from $39/month.
Our monthly plan grants access to all premium features, the best plan for short-term subscribers. (prices are marked in USD)

Yearly

Subscription

$159/yr

Our most popular plan previously sold for $299 and is now only $13/month . This plan saves you over 60% in comparison to the monthly plan. (prices are marked in USD)

 Video Solutions
NEW

Unlock elaborate premium video solutions like this. Each video includes a detailed conceptual overview and code walkthrough that will efficiently guide you through the problem.

 Access to Premium Content

Gain exclusive access to our latest and ever-growing collection of premium content, such as questions, Explore cards, and premium solutions, where detailed explanations are written by our team of algorithm and data structure experts.

 Select Questions by Company

Target your studying more accurately towards your dream job. Find out which companies asked which questions, we have nearly 200 questions from Google alone.

 Autocomplete

Not interested in memorization? With premium access, you receive intelligent code completion inside the LeetCode code editor based on language and an analysis of your source code.

 Debugger

Tired of
System.out.println(val)
? Set breakpoints and debug your code interactively line by line right inside our code editor.

 Lightning Judge

Tired of waiting? Premium users get priority judging using an exclusive queue, resulting in a 3X shorter wait time, up to 10X during peak hours.

 Sort Questions by Prevalence

Find out which questions turn up most frequently in interviews so that you know where to focus your personal studying. Invaluable data collected from thousands of samples.

 Interview Simulations

Mock interviews provide you with a way to test your abilities in a timed setting, just like a coding challenge or on-site interview. You choose the company and we will select an appropriate question from our constantly growing database.

∞  Unlimited Playgrounds

Premium users can create an unlimited number of Playgrounds, up from 10! You also get the ability to organize your Playgrounds in folders.

~ FAQ ~



What will I get with a premium subscription?

In addition to free questions / articles, you will have access to exclusive premium questions / articles as well. You will also be able to group questions by company, and practice mock interviews targeting a specific company.


What are the premium articles? Is there a sample I can look at?

Some of the articles are reserved for premium subscribers only. You can take a look at this free sample article here. Please note that we are adding more articles so please check back frequently.


How does grouping questions by company work?

We compile the list of questions asked by specific companies based on data from user surveys: "Have you met this question in a real interview?". These lists will be kept up to date frequently with the ever growing survey data. You can find the list of companies in the problem list page, just below the Tag lists.


What about all the existing questions?

You will continue to have access to it all, it isn't going anywhere.


I clicked the subscribe button, fill in the credit card information and clicked "Add Payment Method". I still can't access the exclusive problems.

You may access My Subscription page to confirm your subscription. Please check your billing history to make sure the transaction went through. If it shows no new transaction, it means your card was probably declined. Please try subscribe again using another debit/credit card or contact your bank to inquire for more information. If you still encounter problems, contact us.


What if I sign up and want to cancel?

You can cancel your subscription at any time here. After cancellation your subscription will remain active until the current time period is finished.


What are the premium questions?   Show

Here is the current up to date premium question list, more is coming...

  1. Number of Calls Between Two Persons
  2. Number of Distinct Substrings in a String
  3. Daily Leads and Partners
  4. Count Ways to Distribute Candies
  5. Invalid Tweets
  6. Longest Palindromic Subsequence II
  7. Product's Worth Over Invoices
  8. Lowest Common Ancestor of a Binary Tree IV
  9. Fix Names in a Table
  10. Change the Root of a Binary Tree
  11. Average Time of Process per Machine
  12. Correct a Binary Tree
  13. Hopper Company Queries III
  14. Lowest Common Ancestor of a Binary Tree III
  15. Hopper Company Queries II
  16. Lowest Common Ancestor of a Binary Tree II
  17. Hopper Company Queries I
  18. Add Two Polynomials Represented as Linked Lists
  19. Percentage of Users Attended a Contest
  20. Design an Expression Tree With Evaluate Function
  21. All Valid Triplets That Can Represent a Country
  22. Maximum Font to Fit a Sentence in a Screen
  23. Find the Missing IDs
  24. Check If Two Expression Trees are Equivalent
  25. Sellers With No Sales
  26. Find Nearest Right Node in Binary Tree
  27. Build Binary Expression Tree From Infix Expression
  28. The Most Frequently Ordered Products for Each Customer
  29. Bank Account Summary II
  30. Binary Search Tree Iterator II
  31. Customer Who Visited but Did Not Make Any Transactions
  32. Put Boxes Into the Warehouse II
  33. Warehouse Manager
  34. Dot Product of Two Sparse Vectors
  35. Unique Orders and Customers Per Month
  36. Put Boxes Into the Warehouse I
  37. Bank Account Summary
  38. Strings Differ by One Character
  39. The Most Recent Orders for Each Product
  40. The Most Similar Path in a Graph
  41. Fix Product Name Format
  42. Guess the Majority in a Hidden Array
  43. Find the Index of the Large Integer
  44. The Most Recent Three Orders
  45. Patients With a Condition
  46. Diameter of N-Ary Tree
  47. Find Users With Valid E-Mails
  48. Move Sub-Tree of N-Ary Tree
  49. Customer Order Frequency
  50. Find Root of N-Ary Tree
  51. Countries You Can Safely Invest In
  52. Design a File Sharing System
  53. Friendly Movies Streamed Last Month
  54. Clone N-ary Tree
  55. Clone Binary Tree With Random Pointer
  56. Group Sold Products By The Date
  57. Sales by Day of the Week
  58. Delete N Nodes After M Nodes of a Linked List
  59. Find All The Lonely Nodes
  60. Calculate Salaries
  61. Rectangles Area
  62. Active Users
  63. Apples & Oranges
  64. Evaluate Boolean Expression
  65. Create a Session Bar Chart
  66. NPV Queries
  67. Find the Quiet Students in All Exams
  68. Top Travellers
  69. Customers Who Bought Products A and B but Not C
  70. Capital Gain/Loss
  71. Total Sales Amount by Year
  72. Replace Employee ID With The Unique Identifier
  73. Get the Second Most Recent Activity
  74. Number of Trusted Contacts of a Customer
  75. Activity Participants
  76. Students With Invalid Departments
  77. Movie Rating
  78. Number of Transactions per Visit
  79. List the Products Ordered in a Period
  80. Ads Performance
  81. Restaurant Growth
  82. Running Total for Different Genders
  83. Find the Team Size
  84. Check If a String Is a Valid Sequence from Root to Leaves Path in a Binary Tree
  85. Weather Type in Each Country
  86. Find the Start and End Number of Continuous Ranges
  87. Students and Examinations
  88. Traffic Light Controlled Intersection
  89. All People Report to the Given Manager
  90. Print Immutable Linked List in Reverse
  91. Page Recommendations
  92. Counting Elements
  93. Average Selling Price
  94. Web Crawler Multithreaded
  95. Number of Comments per Post
  96. Leftmost Column with at Least a One
  97. Web Crawler
  98. First Unique Number
  99. Report Contiguous Dates
  100. Perform String Shifts
  101. Team Scores in Football Tournament
  102. Queries Quality and Percentage
  103. Monthly Transactions II
  104. Last Person to Fit in the Elevator
  105. Tournament Winners
  106. Monthly Transactions I
  107. Design Bounded Blocking Queue
  108. Immediate Food Delivery II
  109. Immediate Food Delivery I
  110. Diet Plan Performance
  111. Product Price at a Given Date
  112. Market Analysis II
  113. Market Analysis I
  114. Article Views II
  115. Article Views I
  116. User Activity for the Past 30 Days II
  117. User Activity for the Past 30 Days I
  118. Reported Posts II
  119. Number of Ships in a Rectangle
  120. User Purchase Platform
  121. Active Businesses
  122. Reported Posts
  123. Highest Grade For Each Student
  124. Handshakes That Don't Cross
  125. New Users Daily Count
  126. Palindrome Removal
  127. Delete Tree Nodes
  128. Remove Interval
  129. Hexspeak
  130. Unpopular Books
  131. Game Play Analysis V
  132. Divide Chocolate
  133. Synonymous Sentences
  134. Smallest Common Region
  135. Encode Number
  136. Game Play Analysis IV
  137. Game Play Analysis III
  138. Game Play Analysis II
  139. Game Play Analysis I
  140. Valid Palindrome III
  141. Tree Diameter
  142. Design A Leaderboard
  143. Array Transformation
  144. Sales Analysis III
  145. Sales Analysis II
  146. Sales Analysis I
  147. Minimum Time to Build Blocks
  148. Toss Strange Coins
  149. Meeting Scheduler
  150. Missing Number In Arithmetic Progression
  151. Project Employees III
  152. Project Employees II
  153. Project Employees I
  154. Product Sales Analysis III
  155. Product Sales Analysis II
  156. Product Sales Analysis I
  157. Lexicographically Smallest Equivalent String
  158. Number of Valid Subarrays
  159. Longest Repeating Substring
  160. Missing Element in Sorted Array
  161. All Paths from Source Lead to Destination
  162. Confusing Number
  163. Minimize Rounding Error to Meet Target
  164. Campus Bikes
  165. Shortest Way to Form String
  166. Maximum Number of Ones
  167. Stepping Numbers
  168. Two Sum BSTs
  169. Intersection of Three Sorted Arrays
  170. Optimize Water Distribution in a Village
  171. Find Smallest Common Element in All Rows
  172. Minimum Knight Moves
  173. How Many Apples Can You Put into the Basket
  174. Actors and Directors Who Cooperated At Least Three Times
  175. Customers Who Bought All Products
  176. Shortest Distance to Target Color
  177. Before and After Puzzle
  178. Count Substrings with Only One Distinct Letter
  179. Minimum Cost to Connect Sticks
  180. Design File System
  181. String Transforms Into Another String
  182. Single-Row Keyboard
  183. Divide Array Into Increasing Sequences
  184. Analyze User Website Visit Pattern
  185. Minimum Swaps to Group All 1's Together
  186. Check If a Number Is Majority Element in a Sorted Array
  187. Parallel Courses
  188. Connecting Cities With Minimum Cost
  189. Path With Maximum Minimum Value
  190. Largest Unique Number
  191. Maximum Average Subtree
  192. Armstrong Number
  193. Remove Vowels from a String
  194. Number of Days in a Month
  195. The Earliest Moment When Everyone Become Friends
  196. Find K-Length Substrings With No Repeated Characters
  197. Two Sum Less Than K
  198. Sum of Digits in the Minimum Number
  199. Confusing Number II
  200. Brace Expansion
  201. Index Pairs of a String
  202. High Five
  203. Digit Count in Range
  204. Campus Bikes II
  205. Fixed Point
  206. Robot Room Cleaner
  207. Insert into a Sorted Circular Linked List
  208. Similar RGB Color
  209. Split BST
  210. Minimize Max Distance to Gas Station
  211. Search in a Sorted Array of Unknown Size
  212. Basic Calculator III
  213. Encode N-ary Tree to Binary Tree
  214. Serialize and Deserialize N-ary Tree
  215. Find Anagram Mappings
  216. Employee Free Time
  217. Bold Words in String
  218. Convert Binary Search Tree to Sorted Doubly Linked List
  219. Pour Water
  220. IP to CIDR
  221. Number Of Corner Rectangles
  222. Closest Leaf in a Binary Tree
  223. Sentence Similarity II
  224. Sentence Similarity
  225. Minimum Window Subsequence
  226. Max Stack
  227. Candy Crush
  228. Number of Distinct Islands II
  229. Number of Distinct Islands
  230. Next Closest Time
  231. K Empty Slots
  232. Path Sum IV
  233. Equal Tree Partition
  234. Remove 9
  235. Coin Path
  236. 4 Keys Keyboard
  237. Design Search Autocomplete System
  238. Maximum Average Subarray II
  239. Find the Derangement of An Array
  240. Design Log Storage System
  241. Design Excel Sum Formula
  242. Maximum Distance in Arrays
  243. Minimum Factorization
  244. Add Bold Tag in String
  245. Design Compressed String Iterator
  246. Biggest Single Number
  247. Students Report By Geography
  248. Average Salary: Departments VS Company
  249. Second Degree Follower
  250. Shortest Distance in a Line
  251. Shortest Distance in a Plane
  252. Triangle Judgement
  253. Tree Node
  254. Sales Person
  255. Consecutive Available Seats
  256. Friend Requests II: Who Has the Most Friends
  257. Design In-Memory File System
  258. Friend Requests I: Overall Acceptance Rate
  259. Kill Process
  260. Customer Placing the Largest Number of Orders
  261. Investments in 2016
  262. Find Customer Referee
  263. Count Student Number in Departments
  264. Find Cumulative Salary of an Employee
  265. Get Highest Answer Rate Question
  266. Squirrel Simulation
  267. Employee Bonus
  268. Winning Candidate
  269. Maximum Vacation Days
  270. Find Median Given Frequency of Numbers
  271. Managers with at Least 5 Direct Reports
  272. Median Employee Salary
  273. Longest Line of Consecutive One in Matrix
  274. Split Concatenated Strings
  275. Binary Tree Longest Consecutive Sequence II
  276. Split Array with Equal Sum
  277. Boundary of Binary Tree
  278. Output Contest Matches
  279. Construct Binary Tree from String
  280. Lonely Pixel II
  281. Lonely Pixel I
  282. Word Abbreviation
  283. Inorder Successor in BST II
  284. The Maze II
  285. The Maze III
  286. The Maze
  287. Max Consecutive Ones II
  288. Find Permutation
  289. Encode String with Shortest Length
  290. Convex Polygon
  291. Optimal Account Balancing
  292. Sequence Reconstruction
  293. Ternary Expression Parser
  294. Word Squares
  295. Valid Word Square
  296. Sentence Screen Fitting
  297. Minimum Unique Word Abbreviation
  298. Valid Word Abbreviation
  299. Design Phone Directory
  300. Range Addition
  301. Plus One Linked List
  302. Find Leaves of Binary Tree
  303. Nested List Weight Sum II
  304. Design Hit Counter
  305. Bomb Enemy
  306. Sort Transformed Array
  307. Logger Rate Limiter
  308. Rearrange String k Distance Apart
  309. Line Reflection
  310. Design Snake Game
  311. Android Unlock Patterns
  312. Design Tic-Tac-Toe
  313. Moving Average from Data Stream
  314. Longest Substring with At Most K Distinct Characters
  315. Nested List Weight Sum
  316. Largest BST Subtree
  317. Maximum Size Subarray Sum Equals k
  318. Number of Connected Components in an Undirected Graph
  319. Generalized Abbreviation
  320. Shortest Distance from All Buildings
  321. Binary Tree Vertical Order Traversal
  322. Sparse Matrix Multiplication
  323. Range Sum Query 2D - Mutable
  324. Number of Islands II
  325. Smallest Rectangle Enclosing Black Pixels
  326. Binary Tree Longest Consecutive Sequence
  327. Best Meeting Point
  328. Flip Game II
  329. Flip Game
  330. Word Pattern II
  331. Unique Word Abbreviation
  332. Walls and Gates
  333. Inorder Successor in BST
  334. Zigzag Iterator
  335. Wiggle Sort
  336. Find the Celebrity
  337. Paint Fence
  338. Closest Binary Search Tree Value II
  339. Encode and Decode Strings
  340. Closest Binary Search Tree Value
  341. Alien Dictionary
  342. Palindrome Permutation II
  343. Palindrome Permutation
  344. Paint House II
  345. Graph Valid Tree
  346. 3Sum Smaller
  347. Paint House
  348. Verify Preorder Sequence in Binary Search Tree
  349. Factor Combinations
  350. Meeting Rooms II
  351. Meeting Rooms
  352. Flatten 2D Vector
  353. Count Univalue Subtrees
  354. Group Shifted Strings
  355. Strobogrammatic Number III
  356. Strobogrammatic Number II
  357. Strobogrammatic Number
  358. Shortest Word Distance III
  359. Shortest Word Distance II
  360. Shortest Word Distance
  361. Reverse Words in a String II
  362. Two Sum III - Data structure design
  363. Missing Ranges
  364. One Edit Distance
  365. Longest Substring with At Most Two Distinct Characters
  366. Read N Characters Given Read4 II - Call multiple times
  367. Read N Characters Given Read4
  368. Binary Tree Upside Down