Interview prep

Core CS

Interviews are not only DSA. Write short answers; the tutor grades them and strengthens your outline.

OOPs (C++)

5

Encapsulation vs Abstraction

Difference between encapsulation and abstraction with a C++ example idea.

Virtual functions

Why do we need virtual functions? What is a vtable at a high level?

Copy constructor

When should you write your own copy constructor in C++?

Inheritance types

Single vs multiple inheritance in C++. Diamond problem — how does virtual inheritance help?

Polymorphism

Compile-time vs runtime polymorphism examples in C++.

DBMS

5

Normalization

Explain 1NF, 2NF, 3NF in one sentence each with why we care in interviews.

Indexes

When does an index help SELECT but hurt INSERT/UPDATE? Tradeoff?

ACID

Expand ACID and give a real-world analogy for Atomicity.

Joins

INNER vs LEFT JOIN — when do you get NULLs?

Transactions isolation

Name dirty read / non-repeatable read / phantom. Which isolation stops dirty reads?

Operating Systems

5

Process vs Thread

Process vs Thread — memory, creation cost, when to use which.

Deadlock

Four Coffman conditions for deadlock. Name one prevention strategy.

Scheduling

Compare FCFS, SJF, Round Robin in one line each.

Virtual memory

What is paging? What is a page fault at a high level?

Mutex vs semaphore

Mutex vs binary semaphore — key differences for interviews.

Computer Networks

5

TCP vs UDP

TCP vs UDP — reliability, ordering, use-cases.

HTTP vs HTTPS

What does HTTPS add on top of HTTP? Where do certificates fit?

OSI quick

Name OSI layers and one protocol/example at Transport and Application.

DNS

What does DNS do? Walk a browser request from URL to IP at a high level.

3-way handshake

Explain TCP 3-way handshake in 3 bullets.