Question bank

4,310 interview questions, answered.

Reference answers, what the interviewer is really testing, how it is graded, and the follow-ups that come next.

Easy 190Medium 2,498Hard 982
Filters · onDifficulty, topic, company

205 questions

  1. 121Design a queue using static memory allocation.MediumCoding· Intuit
  2. 122Design a task scheduler in Python.MediumCoding· Google, OpenAI
  3. 123Detect cycle in graphMediumCoding· Amazon
  4. 124Determine if a given binary tree is a binary search tree (BST).MediumCoding· Adobe, Google
  5. 125How can you tell if a graph is not a tree?MediumCodingTechnical· Amazon
  6. 126Given a list of integers, return 1 if the integer is a power of 2 and 0 if it is not.MediumCoding· Snap
  7. 127Determine if two sentences are similar.MediumCodingTechnical· Google
  8. 128Edit distanceHardCoding· Adobe, Amazon
  9. 129What is encapsulation?MediumCodingTechnical· Accenture
  10. 130Explain the filter function.MediumCoding· Apple
  11. 131Explain the map function.EasyCoding· Apple
  12. 132Explain multithreading.MediumCoding· Microsoft, Nvidia
  13. 133Explain the sort function.EasyCoding· Apple
  14. 134Given a factory represented as a 2D grid with some cells blocked and some containing robots, determine if the robots can collectively reach all unblocked cells.MediumCoding· Amazon
  15. 135Fibonacci NumbersEasyCoding· Adobe, Google
  16. 136Find the closest palindrome of a given number.MediumCoding· Uber
  17. 137Find duplicate files in a file system.MediumCodingTechnical· Anthropic, Dropbox
  18. 138Find the element at a given position in a sorted version of an unsorted array. Example: Input: {5,1,7,19,0,16}, k=3 Output: 5 (Explanation: Sorted array is {0,1,5,7,16,19}, and the 3rd positioned element is 5.)MediumCodingTechnical· Philips
  19. 139Given an array of points and a point P, find the k closest points to P.MediumCoding· Amazon, LinkedIn
  20. 140Find Largest NumbersMediumCoding· Accenture, Goldman Sachs
  21. 141Given a list of Nodes, each with a unique string id and a list of subnodes it depends on, find the maximum depth of the dependencies.MediumCoding· Amazon
  22. 142Given an array 'nums' with n distinct numbers in the range [0, n], return the only number in the range that is missing from the array.EasyCoding· Accenture
  23. 143Find the number of rotations in a circularly sorted array.MediumCoding· AMD, Microsoft
  24. 144Find the palindromes.EasyCoding· Amazon, Apple