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

1,063 questions

  1. 937Implement a doubly linked list.MediumCoding· Anduril, Apple
  2. 938Implement a red-black tree.HardCoding· Apple
  3. 939Given a list of jobs and a list of dependencies where each job depends on another job being completed first, determine if it is possible to complete all jobs.MediumCoding· Oracle
  4. 940Find the longest common prefix given two integer arrays.MediumCoding· Amazon
  5. 941Given 2 strings, return the longest common substring.MediumCoding· Salesforce
  6. 942Given an array of n integers and a number k, find the maximum number of elements whose sum is less than k, and return their sum.MediumCoding· Goldman Sachs
  7. 943Print the maximum positive sequence in a given array.MediumCoding· Amazon
  8. 944What percentage of users who were active on Messenger yesterday made a video call yesterday?MediumCodingData· Meta
  9. 945Given a binary array where an operation cycles a row's elements to the left or right, return the minimum number of operations needed to create a column of 1s. If not possible, return 0.MediumCoding· Palantir
  10. 946Given positions of N kids and M ice cream sellers on a 1D line, find the smallest distance E such that every kid lies within the range [P - E, P + E] of at least one seller.MediumCoding· Google
  11. 947Monthly Post Success Analysis.EasyCodingData· LinkedIn
  12. 948Implement inorder traversal for an N-ary tree.MediumCoding· Amazon
  13. 949Given an array, print the Next Greater Element (NGE) for each element. The NGE for an element x is the first greater element on the right side of x in the array, or -1 if none exists.MediumCoding· Amazon
  14. 950Given an nxn grid of 1s and 0s, return the number of islands in the input.MediumCoding· Adobe, Amazon
  15. 951Determine if a number is a power of two.MediumCoding· Salesforce
  16. 952Write a function to return all prime numbers up to a given number n.MediumCoding· Adobe, Apple
  17. 953Write a function to print 1 to n without using a loop.EasyCoding· Nvidia
  18. 954Solve an interval scheduling problem by finding “free time” intervals to accept queries.MediumCoding· Scale AI
  19. 955Implement a queue using stacks.MediumCoding· Goldman Sachs
  20. 956Review the given code for a React.js based Tic-tac-toe game written in Typescript and suggest improvements.MediumCoding· MongoDB
  21. 957Remove Duplicate EmailsMediumCodingData· IBM
  22. 958Given a head node of a linked list, delete k-th node from the end of the list.MediumCoding· Meta
  23. 959Given the row and column, return the value at that position in Pascal's triangle.MediumCoding· Goldman Sachs
  24. 960Reverse a SentenceEasyCoding· Adobe, Apple