Top 50 Technical Interview Questions and Answers (2026 Guide)

Home 

Technical Interview Questions

Whether you’re a fresher gearing up for your first role or a seasoned developer targeting your next big move, preparing for technical interview questions is the single most important step you can take. These interviews are designed to test not just what you know, but how you think, how you communicate under pressure, and how you approach real-world problems.

In this comprehensive guide, we cover the top 50 technical interview questions spanning data structures, algorithms, system design, databases, networking, and role-specific domains. Whether you’re interviewing at a startup or a FAANG company, this guide has you covered.

Who is this guide for?

  • Freshers and recent graduates entering tech
  • Mid-level developers preparing for senior roles
  • Hiring managers looking to ask the right questions
  • Anyone switching into a technical career

What Are Technical Interview Questions?

Technical interview questions are structured questions used by employers to evaluate a candidate’s hard skills, problem-solving ability, and depth of knowledge in a specific technical domain. Unlike behavioral questions, they require hands-on demonstration of expertise, whether through live coding, system design discussions, or conceptual explanations.

Interviewers are assessing several things at once: your foundational knowledge, how you break down complex problems, how clearly you communicate your thought process, and how you handle edge cases and constraints.

Types of Technical Interview Questions

Types of Technical Interview Questions

Technical interviews typically cover several categories:

  • Coding & Algorithms: Solving problems using loops, recursion, sorting, searching
  • Data Structures: Arrays, linked lists, stacks, queues, trees, graphs, hash maps
  • System Design: Architecting scalable, distributed systems
  • Database & SQL: Queries, normalization, indexing, ACID properties
  • Networking & OS Concepts: TCP/IP, HTTP, threads, memory management
  • Language/Framework-Specific: Java, Python, JavaScript, React, etc.
  • Behavioral-Technical Hybrid: Situational questions tied to technical challenges

Top Technical Interview Questions for Freshers

If you’re just starting out, interviewers will focus on core fundamentals. Here are 10 commonly asked questions with guidance on how to answer them.

Q1. What is OOP and what are its four pillars?

How to answer: Object-Oriented Programming is a programming paradigm based on the concept of objects. The four pillars are Encapsulation (bundling data and methods), Abstraction (hiding implementation details), Inheritance (deriving new classes from existing ones), and Polymorphism (one interface, multiple implementations). Use a real-world analogy, like a car, to make it concrete.

Q2. Explain the difference between a stack and a queue.

How to answer: A stack follows LIFO (Last In, First Out), like a stack of plates. A queue follows FIFO (First In, First Out), like a line at a ticket counter. Mention real use cases: stacks are used in function call management and undo operations; queues are used in task scheduling and BFS traversal.

Q3. What is a linked list? When would you use it over an array?

How to answer: A linked list is a linear data structure where each element (node) stores a value and a pointer to the next node. Unlike arrays, linked lists allow efficient insertions and deletions at any position without shifting elements. Use a linked list when you have frequent insertions/deletions and don’t need random access.

Q4. What is Big O notation?

How to answer: Big O notation describes the time or space complexity of an algorithm in terms of input size (n). It expresses the worst-case scenario. Common complexities: O(1) constant, O(log n) logarithmic, O(n) linear, O(n²) quadratic. Give examples: binary search is O(log n), bubble sort is O(n²).

Q5. What is the difference between TCP and UDP?

How to answer: TCP (Transmission Control Protocol) is connection-oriented, reliable, and ensures ordered delivery, used for web browsing, emails. UDP (User Datagram Protocol) is connectionless, faster, and doesn’t guarantee delivery, used for video streaming, gaming, DNS.

Q6. What is normalization in databases?

How to answer: Normalization is the process of organizing a relational database to reduce redundancy and improve data integrity. It involves dividing a database into tables and defining relationships. Key normal forms: 1NF (atomic values), 2NF (no partial dependencies), 3NF (no transitive dependencies). Mention that denormalization is sometimes used for performance.

Q7. Explain the concept of recursion with an example.

How to answer: Recursion is when a function calls itself to solve a smaller instance of the same problem. Every recursive solution needs a base case (stopping condition) and a recursive case. Classic example: factorial(n) = n * factorial(n-1), with base case factorial(0) = 1. Also mention the risk of stack overflow with deeply recursive calls.

Q8. What is version control and why is it used?

How to answer: Version control is a system that tracks changes to code over time. It allows multiple developers to collaborate without overwriting each other’s work, and lets you revert to earlier versions. Git is the most widely used VCS. Key concepts: commits, branches, merging, pull requests.

Q9. What is the difference between an API and a library?

How to answer: A library is a collection of reusable code that you call from your program. An API (Application Programming Interface) is a set of rules and protocols that allows different software systems to communicate. A library runs in your process; an API typically involves network communication (e.g., REST API). Example: NumPy is a library; the Twitter API is a web API.

Q10. What is a deadlock?

How to answer: A deadlock is a situation where two or more processes are waiting for each other to release resources, causing all of them to be stuck indefinitely. The four necessary conditions are: Mutual Exclusion, Hold and Wait, No Preemption, and Circular Wait. Mention prevention strategies like resource ordering or using timeouts.

Intermediate Technical Interview Questions

At the intermediate level, interviewers expect you to connect concepts to real-world scenarios and demonstrate practical experience.

Q11. Explain how a hash table works.

How to answer: A hash table stores key-value pairs. A hash function maps keys to bucket indices. When two keys map to the same bucket (collision), it’s resolved by chaining (linked list at each bucket) or open addressing. Average time complexity for insert/search/delete is O(1). Mention when hash tables degrade, high collision rates lead to O(n) performance.

Q12. What is the difference between REST and GraphQL?

How to answer: REST (Representational State Transfer) uses fixed endpoints that return predefined data structures. GraphQL is a query language where the client specifies exactly what data it needs. REST can suffer from over-fetching or under-fetching; GraphQL solves this. However, GraphQL adds complexity and isn’t always the right choice for simple use cases.

Q13. What are ACID properties in databases?

How to answer: ACID stands for: Atomicity (a transaction is all-or-nothing), Consistency (data moves from one valid state to another), Isolation (concurrent transactions don’t interfere), Durability (committed transactions persist even after system failure). These properties are critical for relational databases in banking, e-commerce, and other data-critical systems.

Q14. What is the difference between synchronous and asynchronous programming?

How to answer: Synchronous code executes line by line, each operation waits for the previous one to complete. Asynchronous code allows operations to run in the background; the program continues executing without waiting. Async is essential for I/O-bound tasks like API calls and file reading. In JavaScript, this is handled through callbacks, Promises, and async/await.

Q15. What is the difference between SQL and NoSQL databases?

How to answer: SQL databases are relational, schema-based, and use structured query language (e.g., MySQL, PostgreSQL). NoSQL databases are non-relational and handle unstructured or semi-structured data (e.g., MongoDB, Cassandra). Use SQL when data has clear relationships and strong consistency is needed; use NoSQL for horizontal scaling, flexible schemas, or high-write-volume scenarios.

Q16. How does a load balancer work?

How to answer: A load balancer distributes incoming network traffic across multiple servers to ensure no single server is overwhelmed. Common strategies include Round Robin, Least Connections, and IP Hash. Load balancers improve availability, fault tolerance, and scalability. Examples: AWS Elastic Load Balancer, Nginx.

Q17. What is a design pattern? Name 3 common ones.

How to answer: A design pattern is a reusable solution to a commonly occurring problem in software design. Three key patterns: Singleton (ensures only one instance of a class exists), Observer (objects subscribe to events), Factory (a method for creating objects without specifying the exact class). Mention that patterns are categorized as Creational, Structural, and Behavioral.

Q18. What is the CAP theorem?

How to answer: The CAP theorem states that a distributed system can guarantee only two of three properties at a time: Consistency (every read receives the most recent write), Availability (every request gets a response), and Partition Tolerance (the system continues despite network partitions). In practice, partition tolerance is a given, so systems trade off between consistency and availability. Example: Cassandra favors AP; HBase favors CP.

Advanced Technical Interview Questions

Senior roles require deep architectural thinking, trade-off analysis, and the ability to design systems at scale.

Q19. How would you design a URL shortening service like bit.ly?

How to answer: Walk through key components: a hash function to generate a short code from a long URL, a database to store the mapping, a redirect service that looks up the original URL, and a cache layer (e.g., Redis) for frequently accessed URLs. Discuss handling collisions, expiry of short links, analytics tracking, and scaling to billions of URLs.

Q20. Explain consistent hashing and where it is used.

How to answer: Consistent hashing is a technique used in distributed systems to distribute data across nodes in a way that minimizes remapping when nodes are added or removed. It’s widely used in distributed caches (like Memcached) and databases. The key advantage: adding or removing a node only requires remapping a fraction of the keys, rather than all of them.

Q21. What is the difference between horizontal and vertical scaling?

How to answer: Vertical scaling (scaling up) means adding more resources (CPU, RAM) to an existing server. Horizontal scaling (scaling out) means adding more servers to distribute the load. Horizontal scaling is preferred for high-traffic systems as it provides better fault tolerance and no single point of failure, but requires stateless application design and a load balancer.

Q22. How would you optimize a slow SQL query?

SQL

How to answer: Start with EXPLAIN to analyze the query execution plan. Look for: full table scans (add indexes), N+1 query problems (use JOINs), selecting unnecessary columns (use specific SELECT fields), and missing WHERE clause filters. Also consider query caching, denormalization for read-heavy workloads, and partitioning large tables.

Q23. What is eventual consistency?

How to answer: Eventual consistency is a model used in distributed systems where, given enough time without new updates, all replicas of the data will converge to the same value. It trades immediate consistency for higher availability and performance. Examples: Amazon DynamoDB, DNS propagation. Contrast with strong consistency, where all reads reflect the latest write immediately.

Q24. What are the trade-offs between microservices and monolithic architecture?

How to answer: Monoliths are simpler to develop and deploy initially, but can become hard to scale and maintain as the codebase grows. Microservices offer independent scaling, deployment, and technology choices per service, but introduce network latency, distributed system complexity, and operational overhead. Choose based on team size, product maturity, and scale requirements.

System Design Interview Questions

System design interviews evaluate your ability to architect large-scale, distributed systems. There is rarely one correct answer, interviewers are assessing your thought process and trade-off reasoning.

Q25. How would you design Twitter/Instagram?

Key components to cover: 

  • User service: authentication, profiles
  • Post/Tweet service: create, store, retrieve posts
  • Feed generation: fan-out on write vs. fan-out on read
  • Media storage: CDN for images/videos
  • Search and notifications service

Q26. How would you design a notification system?

Design components: event producers (services that trigger notifications), a message queue (Kafka or RabbitMQ) for async processing, a notification service that routes to push, email, or SMS channels, and a delivery tracking system. Discuss handling retries, user preferences, and rate limiting to avoid spamming users.

Q27. Tips for answering system design questions

  1. Clarify requirements and constraints first (scale, read/write ratio, latency)
  2. Start with a high-level architecture, then dive into components
  3. Discuss trade-offs openly, there is no single right answer
  4. Address scalability, fault tolerance, and data storage explicitly
  5. Know your numbers: how many requests per second, how much storage needed

Behavioral + Technical Hybrid Questions

The best candidates combine technical depth with strong communication and self-awareness. These questions reveal both.

Q28. Tell me about a time you optimized a slow process.

Use the STAR method (Situation, Task, Action, Result). Describe a specific scenario, e.g., a slow database query or an inefficient API. Explain what you identified, what you changed (indexes, caching, algorithm refactoring), and the measurable improvement (50% faster, X% reduction in server load).

Q29. Describe a technical decision you’d change in hindsight.

Interviewers want to see self-awareness and growth. Choose a real example: e.g., choosing a monolith when the project grew to need microservices, or not writing enough tests early. Explain what you learned and how it influenced your approach on subsequent projects.

Q30. How do you keep your technical skills up to date?

Demonstrate genuine curiosity: mention specific resources (Hacker News, tech blogs, official documentation), courses (Coursera, Udemy), communities (GitHub, Stack Overflow), or side projects. Show that learning is a habit, not just something you do before interviews.

Technical Interview Questions by Role

For Software Engineers

  • Implement a function to reverse a linked list
  • Find the two numbers in an array that sum to a target value
  • Implement a binary search algorithm

For Data Engineers / Data Scientists

  • Write a SQL query to find the second highest salary
  • Explain the difference between supervised and unsupervised learning
  • How would you handle missing values in a dataset?

For DevOps / Cloud Engineers

  • What is the difference between Docker and a virtual machine?
  • Explain CI/CD and the stages in a typical pipeline
  • How does Kubernetes handle container orchestration?

For Frontend Developers

  • What is the difference between == and === in JavaScript?
  • Explain the concept of the virtual DOM in React
  • What are Core Web Vitals and why do they matter?

How to Prepare for Technical Interview Questions

Preparation is where interviews are won or lost. Here’s a structured approach:

Practice Platforms

  • LeetCode: Best for DSA and coding challenges. Start with the ‘Top 75’ list.
  • HackerRank: Good for language-specific challenges and company practice tests.
  • InterviewBit: Structured learning paths mapped to real interview patterns.
  • System Design Primer (GitHub): Free and comprehensive resource for system design.

4-Week Study Plan

  • Week 1: Arrays, strings, hash maps, and basic algorithms
  • Week 2: Trees, graphs, recursion, dynamic programming
  • Week 3: System design fundamentals and databases
  • Week 4: Mock interviews, behavioral prep, and review

During the Interview

  • Always think out loud, interviewers want to follow your reasoning
  • Clarify the problem before you start coding
  • Start with a brute-force approach, then optimize
  • Test your solution with edge cases
  • Discuss time and space complexity of your solution

Technical Interview Questions by Technology

Different tech stacks come with their own set of interview questions. Below are 2 essential questions for each major technology, along with links to our dedicated sub-guides where you can find 50+ questions for each topic.

Q31–Q32. Python Interview Questions

Q31. What is the difference between a list and a tuple in Python?

Answer: Lists are mutable (can be changed after creation) while tuples are immutable. Lists use square brackets [], tuples use parentheses (). Tuples are faster and used for fixed data like coordinates; lists are used when data needs to change. Tuples can be used as dictionary keys; lists cannot.

Q32. What are Python decorators and how do they work?

Answer: A decorator is a function that wraps another function to extend its behavior without modifying it. They use the @decorator syntax. Common use cases: logging, authentication, caching. Example: @staticmethod and @property are built-in decorators. Decorators are a key concept in Python’s functional programming capabilities.

>>> Read More: Python interview Questions and answers

Q33–Q34. Power BI Interview Questions

Q33. What is DAX in Power BI and where is it used?

Answer: DAX (Data Analysis Expressions) is a formula language used in Power BI, Power Pivot, and Analysis Services. It is used to create calculated columns, measures, and custom tables. DAX functions include CALCULATE, SUMX, FILTER, and RELATED. Understanding row context vs. filter context is essential for writing correct DAX measures.

Q34. What is the difference between a measure and a calculated column in Power BI?

Answer: A calculated column is computed row by row and stored in the data model — it increases file size. A measure is computed dynamically at query time based on filter context and does not store data. Measures are preferred for aggregations like SUM, AVERAGE, and COUNT as they are more efficient and flexible in reports.

>>> Read More:

Q35–Q36. Angular Interview Questions

Q35. What is the difference between Angular components and directives?

Answer: A component is a directive with a template — it controls a view. A directive modifies the behavior or appearance of an existing DOM element without its own template. Types of directives: structural (e.g., *ngIf, *ngFor) and attribute (e.g., ngClass, ngStyle). Components are the building blocks of an Angular app; directives are used to extend HTML.

Q36. What is dependency injection in Angular?

Answer: Dependency Injection (DI) is a design pattern where a class receives its dependencies from an external source rather than creating them itself. Angular’s DI framework provides services to components through constructors. This promotes loose coupling, testability, and reusability. Services are registered in providers and injected via @Injectable decorator.

>>> Read More:

Q37–Q38. Selenium Interview Questions

Q37. What is the difference between findElement and findElements in Selenium?

Answer: findElement returns the first matching WebElement and throws a NoSuchElementException if not found. findElements returns a list of all matching WebElements and returns an empty list (not an exception) if none are found. Use findElements when you’re unsure if an element exists, or when working with multiple elements like table rows.

Q38. What are implicit and explicit waits in Selenium?

Answer: Implicit wait sets a global timeout for finding elements across the entire session. Explicit wait applies a condition-based wait for a specific element using WebDriverWait and ExpectedConditions. Explicit waits are more precise and preferred. Fluent wait is another option that allows custom polling intervals and ignored exceptions.

>>> Read More:

Q39–Q40. Java 8 Interview Questions

Q39. What are lambda expressions in Java 8 and why are they useful?

Answer: Lambda expressions are anonymous functions introduced in Java 8 that allow you to write functional-style code. They reduce boilerplate by replacing anonymous inner classes, especially for functional interfaces. Syntax: (parameters) -> expression. Example: list.forEach(item -> System.out.println(item)). They work alongside Streams API for powerful data processing pipelines.

Q40. What is the difference between Stream and Collection in Java 8?

Answer: A Collection stores data and is an in-memory data structure. A Stream is a sequence of elements that supports sequential and parallel aggregate operations — it does not store data. Streams are lazy (operations execute only when a terminal operation is called), can be used only once, and are ideal for filtering, mapping, and reducing large datasets.

>>> Read More:

Q41–Q42. Laravel Interview Questions

Q41. What is Eloquent ORM in Laravel?

Answer: Eloquent is Laravel’s built-in ORM (Object-Relational Mapper) that allows you to interact with your database using PHP objects instead of raw SQL. Each database table has a corresponding Model class. Eloquent supports relationships (hasOne, hasMany, belongsTo, belongsToMany) and provides a clean, expressive syntax for queries like User::where(‘active’, 1)->get().

Q42. What is middleware in Laravel and how is it used?

Answer: Middleware is a filtering mechanism that sits between the HTTP request and your application logic. It is used for authentication, logging, CORS handling, and rate limiting. Middleware is registered in Kernel.php and can be applied globally, to route groups, or to individual routes. Custom middleware is created using php artisan make:middleware.

>>> Read More:

Q43–Q44. PHP Interview Questions

Q43. What is the difference between include and require in PHP?

Answer: Both include and require are used to embed a PHP file into another. The difference: if the file is not found, include throws a warning and continues execution, while require throws a fatal error and halts the script. Use require for critical files (e.g., database config) and include for optional files (e.g., sidebars). Their _once variants prevent duplicate inclusion.

Q44. What are PHP sessions and how do they differ from cookies?

Answer: Sessions store data on the server and use a session ID (stored in a cookie) to identify the user. Cookies store data directly on the client’s browser. Sessions are more secure for sensitive data (e.g., login state) since data isn’t exposed to the client. Cookies persist across browser restarts; sessions typically end when the browser closes unless configured otherwise.

>>> Read More:

Q45–Q46. MySQL Interview Questions

Q45. What is the difference between INNER JOIN, LEFT JOIN, and RIGHT JOIN in MySQL?

Answer: INNER JOIN returns rows where there is a match in both tables. LEFT JOIN returns all rows from the left table and matching rows from the right (NULLs for no match). RIGHT JOIN returns all rows from the right table and matching rows from the left. Use INNER JOIN for strict matches, and LEFT/RIGHT JOIN when you need all records from one side regardless of a match.

Q46. What is indexing in MySQL and how does it improve performance?

Answer: An index is a data structure (typically a B-tree) that allows MySQL to find rows faster without scanning the entire table. Indexes speed up SELECT queries but slow down INSERT/UPDATE/DELETE operations since the index must also be updated. Always index columns used in WHERE, JOIN, and ORDER BY clauses. Use EXPLAIN to verify if your query is using indexes.

>>> Read More:

Q47–Q48. .NET Interview Questions

Q47. What is the difference between .NET Framework and .NET Core?

Answer: .NET Framework is Windows-only and is the original implementation. .NET Core (now simply .NET 5+) is cross-platform, open-source, and optimized for cloud and microservices. .NET Core has better performance and is the recommended choice for new projects. .NET Framework is still maintained for legacy Windows applications that depend on it.

Q48. What is the difference between abstract classes and interfaces in C#?

Answer: An abstract class can have both implemented and abstract methods, and can hold state (fields). An interface defines a contract with only method signatures (though C# 8+ allows default implementations). A class can implement multiple interfaces but inherit only one abstract class. Use interfaces for defining capabilities; use abstract classes when sharing common implementation across subclasses.

>>> Read More:

Q49–Q50. Django Interview Questions

Q49. What is the Django MTV architecture?

Answer: Django follows the MTV (Model-Template-View) pattern. The Model handles data and database interaction. The Template handles the presentation layer (HTML). The View contains the business logic and connects models to templates. This is Django’s equivalent of MVC — the View in Django acts like a Controller, and Django’s Template is the View in traditional MVC.

Q50. What is Django ORM and what are its advantages?

Answer: Django ORM (Object-Relational Mapper) lets you interact with your database using Python code instead of raw SQL. You define models as Python classes and Django handles the SQL queries. Advantages: database-agnostic (switch between PostgreSQL, MySQL, SQLite), protection against SQL injection, cleaner code, and built-in migration system (makemigrations and migrate commands).
>>> Read More:

Frequently Asked Questions (FAQ)

What are the most common technical interview questions?

The most commonly asked areas are arrays and strings, linked lists, binary trees, dynamic programming, and system design. Questions on OOP concepts, SQL, and API design also come up frequently depending on the role.

How long does a technical interview last?

A typical technical interview round lasts 45 to 60 minutes. This usually includes 5-10 minutes of introduction, 30-40 minutes of problem solving, and 5-10 minutes for your questions to the interviewer.

What programming language should I use in a technical interview?

Use the language you’re most comfortable with. Python is popular for its clean syntax and shorter code. Java and JavaScript are also widely accepted. Always confirm with the interviewer before the session begins.

How many rounds of technical interviews are typical?

Most companies conduct 2 to 5 technical rounds. This may include an online assessment, phone screen, technical coding rounds, a system design round, and a final hiring manager interview. Large tech companies (Google, Amazon, Meta) typically have 4-6 rounds.

Conclusion

Mastering technical interview questions takes consistent practice, not cramming the night before. This guide has walked you through 50 essential questions, from fresher-level fundamentals to advanced system design challenges, giving you the depth you need across every stage of the interview process.

The best candidates don’t just know the answers, they know how to explain their reasoning clearly, adapt when they’re stuck, and learn quickly from feedback. Focus on building those habits, and the interviews will follow.