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
- Explain Arrays and Strings and their real-time usage.
- Find the duplicate number in an array of integers.
- Rotate an array to the right by k steps.
- Implement an algorithm to determine if a string has all unique characters.
- Check if the two strings are anagrams of each other.
- Implement a function to perform basic string compression using the counts of repeated characters.
- What is Linked Lists?
- What is Reverse a linked list?
- Detect a cycle in a linked list.
- Find the intersection point of two linked lists.
- Remove the N-th node from the end of a linked list.
- Implement a stack using linked lists.
- Trees and Graphs
- Validate a binary search tree.
- Find the lowest common ancestor in a binary tree.
- Perform a depth-first search (DFS) on a graph.
- Implement Breadth-First Search (BFS) on a graph.
- Serialize and deserialize a binary tree.
- Sorting and Searching
- Implement binary search.
- Merge two sorted arrays.
- Find the peak element in an array.
- How to Implement Quicksort?
- How to Search in a rotated sorted array.
- What is called Dynamic Programming?
- Calculate the nth Fibonacci number.
- Find the Longest increasing subsequence in an array.
- Find the Maximum subarray sum.
- Edit the distance between two strings.
- 0/1 Knapsack problem.
- What is called Recursion and explain it with example.
- Implement the Tower of Hanoi.
- Generate all permutations of a string.
- Calculate the power of a number.
- Print all subsets of a set.
- Implement a recursive descent parser.
- What is called Bit Manipulation?
- Find the single non-duplicate number in an array.
- Count set bits in an integer.
- Swap two numbers without using a temporary variable.
- Check if a number is a power of two.
- Reverse bits of a given 32-bit unsigned integer.
- Hashing
- Two Sum problem.
- Group anagrams from a list of strings.
- Implement a hash table.
- Longest substring without repeating characters.
- Design and implement a cache.
- What are Greedy Algorithms?
- Fractional Knapsack problem.
- Activity selection problem.
- What is Huffman coding?
- Job sequencing with deadlines.
- Minimum spanning tree (Prim’s or Kruskal’s algorithm).
- What is called Object-Oriented Design?
- Design a parking lot.
- Design a chess game.
- Implement a deck of cards.
- Design a URL shortening service.
- Design an elevator system.
- What is System Design? explain it with a real-time example
- Design a file storage system.
- Design a URL caching system.
- Design a scalable chat service.
- Design a distributed key-value store.
- Design a social media platform.
- What is a Database?
- Normalize a relational database schema.
- Write an SQL query to find the second highest salary.
- Implement a basic CRUD operation in a database.
- Design a database for a library management system.
- Write an SQL query to calculate the running total.
- Operating Systems
- Explain the difference between process and thread.
- Deadlock prevention and avoidance.
- Virtual memory and paging.
- File system implementation.
- CPU scheduling algorithms.
- Networking
- Explain the OSI model.
- TCP vs. UDP.
- HTTP protocol and its methods.
- DNS resolution process.
- Load balancing algorithms.
- Miscellaneous
- Implement a simple calculator.
- Find the median of two sorted arrays.
- Implement a priority queue.
- Check if a Sudoku is valid.
- Implement a basic regular expression matcher.
- Coding Challenges
- Implement a LRU (Least Recently Used) cache.
- Calculate the edit distance between two strings.
- Find the longest common prefix in an array of strings.
- Word search in a 2D board.
- Design and implement a rate limiter.
- Additional Topics
- Implement a trie (prefix tree).
- Implement Dijkstra’s algorithm.
- Design and implement a bloom filter.
- Find the kth largest element in an array.
- Implement a stack with O(1) push, pop, and retrieve minimum operation.
- Behavioral Questions
- Tell me about a challenging problem you faced and how you solved it.
- Describe a situation where you had to work under pressure to meet a deadline.
- Discuss a project you worked on where you had to collaborate with a team.
- Explain a time when you had to deal with a difficult coworker or team member.
- Describe a situation where you had to quickly learn a new technology or programming language.
- System Architecture
- Design a web crawler.
- Explain the principles of RESTful API design.
- Design a scalable microservices architecture.
- Discuss the advantages and disadvantages of a monolithic architecture.
- Explain how load balancing works in a distributed system.
- Behavioral Questions (Continued)
- Tell me about a time when you had to prioritize multiple tasks.
- Describe a situation where you had to troubleshoot and solve a system issue.
- Discuss a project where you had to make trade-offs between performance and maintainability.
- Explain how you stay updated with the latest technologies and industry trends.
- Describe a situation where you had to mentor or assist a colleague.
- Where do you see yourself in five years?