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