DSA-Gen
All Interview Categories

Computer Science Fundamentals

Core technical interview questions covering Operating Systems, DBMS, Computer Networks, OOPs, and SQL.

Operating Systems

  • What is the difference between a process and a thread?

  • What are the four necessary conditions for a deadlock to occur?

  • How do paging, segmentation, and virtual memory work together?

  • Compare mutexes and semaphores in process synchronization.

  • What is thrashing, and how do CPU scheduling algorithms prevent starvation?

  • Compare context switching between processes vs threads and user-level vs kernel-level threads.

DBMS

  • Explain ACID properties in database transactions.

  • Compare 1NF, 2NF, 3NF, and BCNF normalization forms.

  • What is the difference between a clustered and a non-clustered index?

  • Explain transaction isolation levels and read phenomena (dirty, non-repeatable, phantom reads).

  • How do B-Tree and B+ Tree indexes optimize disk-backed database queries?

Computer Networks

  • Walk through what happens when you enter a URL in a browser (DNS, TCP, TLS, HTTP).

  • Compare TCP and UDP across reliability, ordering, and use cases.

  • Compare the OSI 7-layer model with the TCP/IP model.

  • How does the TCP three-way handshake establish a connection?

  • Explain HTTP/1.1, HTTP/2, HTTP/3, and how HTTPS TLS handshakes verify server identity.

OOPs

  • Explain encapsulation, abstraction, inheritance, and polymorphism with practical design scenarios.

  • What is the difference between compile-time (static) and runtime (dynamic) polymorphism?

  • Compare abstract classes and interfaces, and when to prefer composition over inheritance.

  • Explain the SOLID design principles in object-oriented architecture.

  • Compare method overloading vs method overriding, and deep copy vs shallow copy.

  • What is the Diamond Problem in multiple inheritance, and how do languages resolve it?

SQL Interview Questions

  • Write an SQL query to find the second highest salary in an Employee table.

  • Explain the differences between INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL OUTER JOIN.

  • Compare WHERE vs HAVING clauses and GROUP BY vs window functions (ROW_NUMBER, RANK, DENSE_RANK).

  • Explain the difference between DELETE, TRUNCATE, and DROP statements.

  • How do you identify and remove duplicate rows from an SQL table?

  • Compare primary keys, unique keys, foreign keys, and composite indexes.