Skip to content

Top 101 Coding Interview Questions for all programming languages

Reading Time: 3 minutes

Coding Interviews are a bit complicated and need more fundamental knowledge about programming. Here are the essential top 100 interview questions for all kinds of programming languages including Java, Javascript, Python, PHP, C, C++, and any other you guess.

Coding Interview Questions

  1. Explain Arrays and Strings and their real-time usage.
  2. Find the duplicate number in an array of integers.
  3. Rotate an array to the right by k steps.
  4. Implement an algorithm to determine if a string has all unique characters.
  5. Check if the two strings are anagrams of each other.
  6. Implement a function to perform basic string compression using the counts of repeated characters.
  7. What is Linked Lists?
  8. What is Reverse a linked list?
  9. Detect a cycle in a linked list.
  10. Find the intersection point of two linked lists.
  11. Remove the N-th node from the end of a linked list.
  12. Implement a stack using linked lists.
  13. Trees and Graphs
  14. Validate a binary search tree.
  15. Find the lowest common ancestor in a binary tree.
  16. Perform a depth-first search (DFS) on a graph.
  17. Implement Breadth-First Search (BFS) on a graph.
  18. Serialize and deserialize a binary tree.
  19. Sorting and Searching
  20. Implement binary search.
  21. Merge two sorted arrays.
  22. Find the peak element in an array.
  23. How to Implement Quicksort?
  24. How to Search in a rotated sorted array.
  25. What is called Dynamic Programming?
  26. Calculate the nth Fibonacci number.
  27. Find the Longest increasing subsequence in an array.
  28. Find the Maximum subarray sum.
  29. Edit the distance between two strings.
  30. 0/1 Knapsack problem.
  31. What is called Recursion and explain it with example.
  32. Implement the Tower of Hanoi.
  33. Generate all permutations of a string.
  34. Calculate the power of a number.
  35. Print all subsets of a set.
  36. Implement a recursive descent parser.
  37. What is called Bit Manipulation?
  38. Find the single non-duplicate number in an array.
  39. Count set bits in an integer.
  40. Swap two numbers without using a temporary variable.
  41. Check if a number is a power of two.
  42. Reverse bits of a given 32-bit unsigned integer.
  43. Hashing
  44. Two Sum problem.
  45. Group anagrams from a list of strings.
  46. Implement a hash table.
  47. Longest substring without repeating characters.
  48. Design and implement a cache.
  49. What are Greedy Algorithms?
  50. Fractional Knapsack problem.
  51. Activity selection problem.
  52. What is Huffman coding?
  53. Job sequencing with deadlines.
  54. Minimum spanning tree (Prim’s or Kruskal’s algorithm).
  55. What is called Object-Oriented Design?
  56. Design a parking lot.
  57. Design a chess game.
  58. Implement a deck of cards.
  59. Design a URL shortening service.
  60. Design an elevator system.
  61. What is System Design? explain it with a real-time example
  62. Design a file storage system.
  63. Design a URL caching system.
  64. Design a scalable chat service.
  65. Design a distributed key-value store.
  66. Design a social media platform.
  67. What is a Database?
  68. Normalize a relational database schema.
  69. Write an SQL query to find the second highest salary.
  70. Implement a basic CRUD operation in a database.
  71. Design a database for a library management system.
  72. Write an SQL query to calculate the running total.
  73. Operating Systems
  74. Explain the difference between process and thread.
  75. Deadlock prevention and avoidance.
  76. Virtual memory and paging.
  77. File system implementation.
  78. CPU scheduling algorithms.
  79. Networking
  80. Explain the OSI model.
  81. TCP vs. UDP.
  82. HTTP protocol and its methods.
  83. DNS resolution process.
  84. Load balancing algorithms.
  85. Miscellaneous
  86. Implement a simple calculator.
  87. Find the median of two sorted arrays.
  88. Implement a priority queue.
  89. Check if a Sudoku is valid.
  90. Implement a basic regular expression matcher.
  91. Coding Challenges
  92. Implement a LRU (Least Recently Used) cache.
  93. Calculate the edit distance between two strings.
  94. Find the longest common prefix in an array of strings.
  95. Word search in a 2D board.
  96. Design and implement a rate limiter.
  97. Additional Topics
  98. Implement a trie (prefix tree).
  99. Implement Dijkstra’s algorithm.
  100. Design and implement a bloom filter.
  101. Find the kth largest element in an array.
  102. Implement a stack with O(1) push, pop, and retrieve minimum operation.
  103. Behavioral Questions
  104. Tell me about a challenging problem you faced and how you solved it.
  105. Describe a situation where you had to work under pressure to meet a deadline.
  106. Discuss a project you worked on where you had to collaborate with a team.
  107. Explain a time when you had to deal with a difficult coworker or team member.
  108. Describe a situation where you had to quickly learn a new technology or programming language.
  109. System Architecture
  110. Design a web crawler.
  111. Explain the principles of RESTful API design.
  112. Design a scalable microservices architecture.
  113. Discuss the advantages and disadvantages of a monolithic architecture.
  114. Explain how load balancing works in a distributed system.
  115. Behavioral Questions (Continued)
  116. Tell me about a time when you had to prioritize multiple tasks.
  117. Describe a situation where you had to troubleshoot and solve a system issue.
  118. Discuss a project where you had to make trade-offs between performance and maintainability.
  119. Explain how you stay updated with the latest technologies and industry trends.
  120. Describe a situation where you had to mentor or assist a colleague.
  121. Where do you see yourself in five years?
See also  Active Directory Interview Questions

Leave a Reply