Recent interview Questions for Amazon

Prepare better for facebook

Hey, if you're thinking about acing that facebook interview, we've got you covered! 🌟

We've gathered interview questions asked of candidates over the past six months from various sources.

The questions are currently in random order, but if you want them sorted from most frequently asked to less frequent, consider subscribing.

We'll send you personalized links to make your preparation even more tailored to your needs.

Best of luck with your interview journey! 🚀

  1. Project Employees III
  2. Maximum Path Quality of a Graph
  3. Largest Rectangle in Histogram
  4. Add Two Integers
  5. Max Area of Island
  6. Trim a Binary Search Tree
  7. Sort List
  8. Largest BST Subtree
  9. Read N Characters Given read4 II - Call Multiple Times
  10. Lowest Common Ancestor of a Binary Search Tree
  11. Monotonic Array
  12. Valid Mountain Array
  13. Calculate Amount Paid in Taxes
  14. Valid Palindrome
  15. Contains Duplicate II
  16. Generate Random Point in a Circle
  17. Valid Parenthesis String
  18. Single-Threaded CPU
  19. Remove Duplicates from Sorted Array II
  20. Maximum Number of Ways to Partition an Array
  21. Fibonacci Number
  22. Counter
  23. Find a Corresponding Node of a Binary Tree in a Clone of That Tree
  24. Unique Number of Occurrences
  25. Find the Index of the First Occurrence in a String
  26. Shuffle an Array
  27. Meeting Rooms
  28. Find K-th Smallest Pair Distance
  29. Consecutive Characters
  30. Friend Requests I: Overall Acceptance Rate
  31. Rotate List
  32. Kth Largest Element in an Array
  33. Palindrome Number
  34. Single Number
  35. Repeated Substring Pattern
  36. Crawler Log Folder
  37. Binary Tree Cameras
  38. Bulls and Cows
  39. Defanging an IP Address
  40. Delete Node in a BST
  41. Steps to Make Array Non-decreasing
  42. Contains Duplicate
  43. Restore IP Addresses
  44. Total Hamming Distance
  45. Divide Two Integers
  46. Letter Combinations of a Phone Number
  47. Longest Repeating Character Replacement
  48. Rank Transform of an Array
  49. Add One Row to Tree
  50. Nearest Exit from Entrance in Maze
  51. Nested List Weight Sum
  52. Flatten Nested List Iterator
  53. Split Array Largest Sum
  54. Find All Anagrams in a String
  55. Trapping Rain Water II
  56. Convert Sorted List to Binary Search Tree
  57. Reorder List
  58. Insert into a Sorted Circular Linked List
  59. Stickers to Spell Word
  60. Verifying an Alien Dictionary
  61. Partition Labels
  62. Swapping Nodes in a Linked List
  63. Previous Permutation With One Swap
  64. Primary Department for Each Employee
  65. Number of Islands
  66. Plus One
  67. Maximum Compatibility Score Sum
  68. Number of Distinct Islands II
  69. Maximum Depth of Binary Tree
  70. Shortest Word Distance
  71. Consecutive Numbers
  72. Accounts Merge
  73. Jump Game III
  74. Angle Between Hands of a Clock
  75. Reorganize String
  76. Find the Difference
  77. The Number of Weak Characters in the Game
  78. Design HashMap
  79. Minimum Window Substring
  80. Bulb Switcher
  81. Friends Of Appropriate Ages
  82. Number of 1 Bits
  83. Shortest Way to Form String
  84. Valid Triangle Number
  85. Minimum Swaps To Make Sequences Increasing
  86. Text Justification
  87. Reverse Bits
  88. Max Stack
  89. Department Highest Salary
  90. Kth Ancestor of a Tree Node
  91. Count and Say
  92. Diameter of N-Ary Tree
  93. Car Pooling
  94. Subtract the Product and Sum of Digits of an Integer
  95. Build Array from Permutation
  96. K-th Symbol in Grammar
  97. Subarray Product Less Than K
  98. Sudoku Solver
  99. Single Element in a Sorted Array
  100. Insert Delete GetRandom O(1) - Duplicates allowed
  101. Minimum Depth of Binary Tree
  102. Binary Tree Inorder Traversal
  103. Two City Scheduling
  104. All Nodes Distance K in Binary Tree
  105. Buildings With an Ocean View
  106. Wildcard Matching
  107. Exclusive Time of Functions
  108. Similar String Groups
  109. Minimum Add to Make Parentheses Valid
  110. Maximum Average Subtree
  111. Search in Rotated Sorted Array
  112. Swap Nodes in Pairs
  113. Kth Largest Element in a Stream
  114. Word Search II
  115. Tree Diameter
  116. Find Leaves of Binary Tree
  117. Product of Array Except Self
  118. Lowest Common Ancestor of Deepest Leaves
  119. Check If Two String Arrays are Equivalent
  120. Check Knight Tour Configuration
  121. Find First and Last Position of Element in Sorted Array
  122. Maximum Swap
  123. Longest Substring with At Most Two Distinct Characters
  124. Insert Delete GetRandom O(1)
  125. Reconstruct Itinerary
  126. Page Recommendations II
  127. Best Time to Buy and Sell Stock with Transaction Fee
  128. Next Greater Element III
  129. Course Schedule
  130. Replace Elements with Greatest Element on Right Side
  131. Binary Search Tree Iterator II
  132. Trapping Rain Water
  133. Roman to Integer
  134. Valid Number
  135. Alien Dictionary
  136. Simplify Path
  137. Two Sum Less Than K
  138. Sum Root to Leaf Numbers
  139. Merge Two Binary Trees
  140. Expression Add Operators
  141. Valid Perfect Square
  142. Reported Posts
  143. Minimum Average Difference
  144. Increasing Triplet Subsequence
  145. Subsets
  146. Sort Array By Parity
  147. Task Scheduler II
  148. Find All Numbers Disappeared in an Array
  149. Serialize and Deserialize Binary Tree
  150. Course Schedule II
  151. Same Tree
  152. Spiral Matrix II
  153. Longest Substring Without Repeating Characters
  154. Maximum Number of Darts Inside of a Circular Dartboard
  155. Remove Covered Intervals
  156. Remove All Adjacent Duplicates In String
  157. Cousins in Binary Tree
  158. Continuous Subarray Sum
  159. Missing Number
  160. Minimum Area Rectangle
  161. Smallest String With A Given Numeric Value
  162. Count Nodes Equal to Average of Subtree
  163. Reported Posts II
  164. Move Zeroes
  165. Integer to English Words
  166. Find K Closest Elements
  167. Encode and Decode Strings
  168. Rectangle Overlap
  169. Balanced Binary Tree
  170. Sum of Square Numbers
  171. Maximum Gap
  172. Strong Friendship
  173. Best Time to Buy and Sell Stock II
  174. Buddy Strings
  175. Jump Game II
  176. Find Median from Data Stream
  177. Reverse Linked List
  178. Apply Discount Every n Orders
  179. Group Shifted Strings
  180. Merge Sorted Array
  181. Process Restricted Friend Requests
  182. Top K Frequent Elements
  183. Lowest Common Ancestor of a Binary Tree III
  184. Length of Last Word
  185. Find the Celebrity
  186. Remove Duplicates from Sorted List
  187. Maximum Product Subarray
  188. Combinations
  189. Two Sum IV - Input is a BST
  190. Intersection of Two Linked Lists
  191. Check Array Formation Through Concatenation
  192. Find the Duplicate Number
  193. Number of Squareful Arrays
  194. Replace Words
  195. Groups of Special-Equivalent Strings
  196. LFU Cache
  197. Word Ladder II
  198. Number of Distinct Islands
  199. H-Index
  200. Integer to Roman
  201. Moving Average from Data Stream
  202. Longest Increasing Subsequence
  203. Binary Tree Zigzag Level Order Traversal
  204. Find Largest Value in Each Tree Row
  205. Number of Matching Subsequences
  206. Number of Pairs of Strings With Concatenation Equal to Target
  207. Range Sum Query 2D - Immutable
  208. Palindrome Permutation
  209. Lowest Common Ancestor of a Binary Tree II
  210. Reverse Linked List II
  211. Count Nodes Equal to Sum of Descendants
  212. First Missing Positive
  213. Implement Trie (Prefix Tree)
  214. Maximal Rectangle
  215. Delete and Earn
  216. Ransom Note
  217. Next Greater Element II
  218. Sum of All Odd Length Subarrays
  219. Finding Pairs With a Certain Sum
  220. Validate Binary Search Tree
  221. Minimum Cost to Reach Destination in Time
  222. Merge Intervals
  223. Web Crawler Multithreaded
  224. Median of Two Sorted Arrays
  225. Goat Latin
  226. Print Immutable Linked List in Reverse
  227. Number of Subsequences That Satisfy the Given Sum Condition
  228. Flatten Binary Tree to Linked List
  229. Triangle Judgement
  230. Minimum Cost For Tickets
  231. Unique Binary Search Trees II
  232. Lowest Common Ancestor of a Binary Tree
  233. Maximum Difference Between Node and Ancestor
  234. Maximum Level Sum of a Binary Tree
  235. Closest Binary Search Tree Value
  236. Recyclable and Low Fat Products
  237. Kth Smallest Element in a Sorted Matrix
  238. Daily Temperatures
  239. Queries Quality and Percentage
  240. Merge Two Sorted Lists
  241. Range Sum of BST
  242. Combination Sum IV
  243. Partition List
  244. Battleships in a Board
  245. Apples & Oranges
  246. Number of Valid Move Combinations On Chessboard
  247. Walls and Gates
  248. Report Contiguous Dates
  249. Can Place Flowers
  250. Big Countries
  251. Step-By-Step Directions From a Binary Tree Node to Another
  252. Clone Graph
  253. Sorting the Sentence
  254. Shortest Bridge
  255. Evaluate Division
  256. Minesweeper
  257. Page Recommendations
  258. Next Permutation
  259. Binary Search Tree to Greater Sum Tree
  260. Longest Substring with At Most K Distinct Characters
  261. Squares of a Sorted Array
  262. Image Smoother
  263. Project Employees II
  264. Min Cost to Connect All Points
  265. Sliding Window Median
  266. Remove Outermost Parentheses
  267. Missing Ranges
  268. Make Two Arrays Equal by Reversing Subarrays
  269. Sum of Left Leaves
  270. Top K Frequent Words
  271. Best Time to Buy and Sell Stock
  272. Shortest Path in a Hidden Grid
  273. Palindromic Substrings
  274. Minimum Number of Arrows to Burst Balloons
  275. Max Consecutive Ones III
  276. Reverse Nodes in k-Group
  277. Binary Search
  278. Set Matrix Zeroes
  279. Binary Tree Level Order Traversal
  280. Dota2 Senate
  281. Two Sum II - Input Array Is Sorted
  282. Scramble String
  283. Find Minimum in Rotated Sorted Array
  284. All Possible Full Binary Trees
  285. Contiguous Array
  286. Binary Search Tree Iterator
  287. Zigzag Conversion
  288. Decode Ways II
  289. Minimum Path Cost in a Hidden Grid
  290. LRU Cache
  291. Maximum Frequency Stack
  292. Koko Eating Bananas
  293. Missing Element in Sorted Array
  294. Path Sum II
  295. Regular Expression Matching
  296. Non-overlapping Intervals
  297. Binary Tree Paths
  298. Queue Reconstruction by Height
  299. Remove Duplicate Letters
  300. Maximal Square
  301. Inorder Successor in BST
  302. Find the Kth Smallest Sum of a Matrix With Sorted Rows
  303. Sparse Matrix Multiplication
  304. Reverse Integer
  305. Customers Who Bought Products A and B but Not C
  306. Add to Array-Form of Integer
  307. Sort Characters By Frequency
  308. Remove Element
  309. H-Index II
  310. Random Pick with Weight
  311. Valid Word Abbreviation
  312. Design Add and Search Words Data Structure
  313. Find Target Indices After Sorting Array
  314. Valid Palindrome III
  315. Moving Stones Until Consecutive
  316. Basic Calculator III
  317. 4Sum II
  318. Strobogrammatic Number
  319. Longest Increasing Path in a Matrix
  320. Maximum Size Subarray Sum Equals k
  321. Diameter of Binary Tree
  322. The k-th Lexicographical String of All Happy Strings of Length n
  323. Path Sum III
  324. Coin Change
  325. Binary Tree Pruning
  326. Create Hello World Function
  327. Excel Sheet Column Number
  328. Shortest Path in Binary Matrix
  329. Longest Palindromic Subsequence
  330. Number of Connected Components in an Undirected Graph
  331. Minimum Insertions to Balance a Parentheses String
  332. Word Break II
  333. Intersection of Three Sorted Arrays
  334. Sum of Unique Elements
  335. The Number of Beautiful Subsets
  336. Peeking Iterator
  337. Diagonal Traverse II
  338. Words Within Two Edits of Dictionary
  339. N-Queens
  340. Knight Dialer
  341. Rotate Image
  342. Running Sum of 1d Array
  343. Count Number of Teams
  344. Longest Continuous Increasing Subsequence
  345. Minimum Height Trees
  346. Binary Tree Right Side View
  347. Count Pairs Whose Sum is Less than Target
  348. Kth Smallest Element in a BST
  349. Reverse Pairs
  350. Employee Free Time
  351. Single Number III
  352. Number of Visible People in a Queue
  353. Implement Magic Dictionary
  354. Intersection of Two Arrays
  355. User Activity for the Past 30 Days I
  356. Strobogrammatic Number II
  357. Flatten a Multilevel Doubly Linked List
  358. Shortest Subarray with Sum at Least K
  359. Shortest Distance from All Buildings
  360. 3Sum
  361. The Maze
  362. Path Sum
  363. Word Pattern
  364. Maximize the Confusion of an Exam
  365. Best Meeting Point
  366. Vertical Order Traversal of a Binary Tree
  367. Dot Product of Two Sparse Vectors
  368. Remove Duplicates from Sorted Array
  369. Construct Binary Search Tree from Preorder Traversal
  370. Maximum Subarray Sum with One Deletion
  371. Search in Rotated Sorted Array II
  372. Excel Sheet Column Title
  373. Reverse Words in a String
  374. Binary Tree Vertical Order Traversal
  375. Meeting Rooms II
  376. 3Sum Smaller
  377. Island Perimeter
  378. Remove Duplicates from Sorted List II
  379. Minimum Operations to Make a Uni-Value Grid
  380. Largest Plus Sign
  381. Read N Characters Given Read4
  382. Fraction to Recurring Decimal
  383. Maximum Subarray
  384. Two Sum
  385. Task Scheduler
  386. Partition Equal Subset Sum
  387. First Unique Number
  388. Perfect Squares
  389. Inorder Successor in BST II
  390. Longest Arithmetic Subsequence of Given Difference
  391. Check if One String Swap Can Make Strings Equal
  392. Get Highest Answer Rate Question
  393. Number of Enclaves
  394. Find in Mountain Array
  395. Kth Missing Positive Number
  396. Palindrome Partitioning
  397. Add Bold Tag in String
  398. Search Suggestions System
  399. Min Stack
  400. The Skyline Problem
  401. Word Ladder
  402. Faulty Sensor
  403. Partition Array for Maximum Sum
  404. Pow(x, n)
  405. Binary Tree Maximum Path Sum
  406. Design Search Autocomplete System
  407. Remove All Adjacent Duplicates in String II
  408. Minimum Remove to Make Valid Parentheses
  409. Hamming Distance
  410. Find the Winner of the Circular Game
  411. Convert Binary Search Tree to Sorted Doubly Linked List
  412. Largest Number
  413. Maximum Width of Binary Tree
  414. Populating Next Right Pointers in Each Node II
  415. Flood Fill
  416. Reverse String
  417. Custom Sort String
  418. Diagonal Traverse
  419. Longest Common Prefix
  420. Separate the Digits in an Array
  421. Sum of k-Mirror Numbers
  422. Sqrt(x)
  423. Peak Index in a Mountain Array
  424. Target Sum
  425. Remove K Digits
  426. Prefix and Suffix Search
  427. Count Hills and Valleys in an Array
  428. Candy Crush
  429. Critical Connections in a Network
  430. Symmetric Tree
  431. Middle of the Linked List
  432. Intersection of Two Arrays II
  433. Letter Case Permutation
  434. Ads Performance
  435. Add Strings
  436. Interval List Intersections
  437. Increasing Order Search Tree
  438. First Bad Version
  439. Average of Levels in Binary Tree
  440. K Closest Points to Origin
  441. Maximum Number of Tasks You Can Assign
  442. Remove Nth Node From End of List
  443. Multiply Strings
  444. Find Distance in a Binary Tree
  445. Check if an Original String Exists Given Two Encoded Strings
  446. Basic Calculator
  447. Maximum Binary Tree II
  448. Average Time of Process per Machine
  449. Unique Paths II
  450. Number of Ways to Arrive at Destination
  451. Majority Element II
  452. Remove Invalid Parentheses
  453. Invert Binary Tree
  454. Toeplitz Matrix
  455. Valid Parentheses
  456. Jump Game V
  457. Check if the Sentence Is Pangram
  458. Valid Anagram
  459. Palindrome Permutation II
  460. First Unique Character in a String
  461. Delete Nodes And Return Forest
  462. Group Anagrams
  463. Subarray Sum Equals K
  464. Number of Good Pairs
  465. Find K Pairs with Smallest Sums
  466. Find All Duplicates in an Array
  467. Rectangle Area
  468. Ugly Number
  469. Number of Longest Increasing Subsequence
  470. Generate Parentheses
  471. Longest Palindromic Substring
  472. Spiral Matrix
  473. Construct Binary Tree from String
  474. Unique Paths
  475. Next Greater Element I
  476. Leftmost Column with at Least a One
  477. The Score of Students Solving Math Expression
  478. House Robber III
  479. Guess Number Higher or Lower
  480. Permutation in String
  481. Evaluate Reverse Polish Notation
  482. Number of Substrings Containing All Three Characters
  483. Web Crawler
  484. Candy
  485. Swim in Rising Water
  486. Palindrome Pairs
  487. Sum of Two Integers
  488. 3Sum Closest
  489. Construct String from Binary Tree
  490. Find the Middle Index in Array
  491. Integer Break
  492. Range Sum Query - Immutable
  493. Convert BST to Greater Tree
  494. Capacity To Ship Packages Within D Days
  495. Path With Maximum Minimum Value
  496. Longest Univalue Path
  497. Score of Parentheses
  498. Decode Ways
  499. Add Binary
  500. Longest Subsequence Repeated k Times
  501. Binary Tree Postorder Traversal
  502. Merge k Sorted Lists
  503. Making A Large Island
  504. Container With Most Water
  505. Graph Valid Tree
  506. Pascal's Triangle
  507. Jump Game
  508. Combination Sum
  509. Number of Comments per Post
  510. Balance a Binary Search Tree
  511. Palindrome Linked List
  512. Finding the Topic of Each Post
  513. Partition to K Equal Sum Subsets
  514. Minimum Number of Swaps to Make the String Balanced
  515. Asteroid Collision
  516. Paint House II
  517. Fizz Buzz
  518. Encode and Decode TinyURL
  519. Rotated Digits
  520. Maximum Average Subarray I
  521. Cutting Ribbons
  522. Random Pick Index
  523. All Paths From Source to Target
  524. Different Ways to Add Parentheses
  525. Valid Sudoku
  526. Number Of Corner Rectangles
  527. Unique Paths III
  528. House Robber
  529. Redundant Connection
  530. Longest Valid Parentheses
  531. Check Completeness of a Binary Tree
  532. Valid Palindrome II
  533. Subsets II
  534. One Edit Distance
  535. Populating Next Right Pointers in Each Node
  536. Sort Colors
  537. 01 Matrix
  538. Sliding Window Maximum
  539. K Radius Subarray Averages
  540. Shortest Path Visiting All Nodes
  541. Permutations
  542. Word Search
  543. Design A Leaderboard
  544. Count Items Matching a Rule
  545. Boundary of Binary Tree
  546. The kth Factor of n
  547. Minimum Absolute Difference in BST
  548. Odd Even Linked List
  549. Search a 2D Matrix II
  550. Number of Calls Between Two Persons
  551. Max Sum of a Pair With Equal Sum of Digits
  552. Validate Binary Tree Nodes
  553. Remove Linked List Elements
  554. Project Employees I
  555. Active Users
  556. Open the Lock
  557. Construct the Lexicographically Largest Valid Sequence
  558. Find Winner on a Tic Tac Toe Game
  559. Climbing Stairs
  560. Happy Number
  561. Combination Sum II
  562. Gas Station
  563. Sort an Array
  564. Maximum Nesting Depth of the Parentheses
  565. Word Break
  566. Search a 2D Matrix
  567. Reverse Words in a String III
  568. Brick Wall
  569. Subtree of Another Tree
  570. Find Unique Binary String
  571. Edit Distance
  572. Sum of Distances in Tree
  573. Subarray Sums Divisible by K
  574. Online Stock Span
  575. Decode String
  576. Shortest Path in a Grid with Obstacles Elimination
  577. Design Tic-Tac-Toe
  578. Complete Binary Tree Inserter
  579. Remove One Element to Make the Array Strictly Increasing
  580. Product of Two Run-Length Encoded Arrays
  581. 4Sum
  582. Search Insert Position
  583. Find Mode in Binary Search Tree
  584. Find All People With Secret
  585. Is Graph Bipartite?
  586. All Elements in Two Binary Search Trees
  587. Maximum Sum of 3 Non-Overlapping Subarrays
  588. Binary Tree Longest Consecutive Sequence
  589. Design Circular Queue
  590. Delete Operation for Two Strings
  591. Find Pivot Index
  592. Robot Room Cleaner
  593. Rotate Array
  594. Minimum Time to Collect All Apples in a Tree
  595. Cheapest Flights Within K Stops
  596. Coin Change II
  597. Find Peak Element
  598. Basic Calculator II
  599. Minimum Size Subarray Sum
  600. Minimum Knight Moves
  601. Moving Stones Until Consecutive II
  602. String to Integer (atoi)
  603. Majority Element
  604. String Compression
  605. Couples Holding Hands
  606. Longest Consecutive Sequence
  607. Design Skiplist
  608. Detect Cycles in 2D Grid
  609. Insert Interval
  610. Add Two Numbers
  611. Smallest Subtree with all the Deepest Nodes
  612. User Activity for the Past 30 Days II
  613. Copy List with Random Pointer
  614. Friend Requests II: Who Has the Most Friends
  615. Lexicographical Numbers
  616. Employees Earning More Than Their Managers