150 PRACTICE QUESTIONS

Computer Science Engineering Mock Interview Questions & Practice

Prepare for Computer Science Engineering placement and job interviews with 150 technical practice questions across 5 subjects: Data Structures & Algorithms, Operating Systems, Database Management Systems, Computer Networks and Object-Oriented Programming. Below are sample Computer Science Engineering interview questions with the key points a strong answer covers. Practice them out loud in a scored mock interview — your first session is free.

Subjects covered in the Computer Science Engineering mock interview

Data Structures & Algorithms

  • Arrays & Strings
  • Linked Lists & Trees
  • Sorting, Searching & Complexity

Operating Systems

  • Process & Thread Management
  • Memory Management
  • Concurrency & Synchronization

Database Management Systems

  • Relational Model & SQL
  • Normalization & Schema Design
  • Transactions & Indexing

Computer Networks

  • Networking Fundamentals & OSI Model
  • TCP/IP & Routing
  • Application Layer Protocols & Security

Object-Oriented Programming

  • Core OOP Principles
  • Design Patterns
  • Inheritance, Polymorphism & SOLID

Sample Computer Science Engineering interview questions

A selection from the Computer Science Engineering question bank. In a MockManthan session the interviewer asks each question aloud and you answer on camera — these key points show what a complete answer should include.

Data Structures & Algorithms interview questions

  1. Explain how you would detect if two strings are anagrams of each other.

    Arrays & Strings

    Key points to cover:

    • Character frequency count comparison
    • Sorting approach as an alternative, O(n log n)
    • Discusses the time/space trade-off between the two approaches
  2. How would you find the lowest common ancestor of two nodes in a binary search tree?

    Linked Lists & Trees

    Key points to cover:

    • Uses the BST property while traversing from the root
    • States O(h) time complexity
    • Contrasts with general binary-tree LCA needing a full traversal
  3. How does quicksort's pivot selection affect its performance?

    Sorting, Searching & Complexity

    Key points to cover:

    • Poor pivot choice (e.g. first element on sorted input) degrades to O(n^2)
    • Randomized or median-of-three pivot selection helps avoid the worst case
    • Connects pivot quality to partition balance

Operating Systems interview questions

  1. Explain the difference between multithreading and multiprocessing.

    Process & Thread Management

    Key points to cover:

    • Multithreading shares memory within one process, lower overhead
    • Needs synchronization to avoid shared-state issues
    • Multiprocessing uses separate memory spaces, higher isolation and overhead
  2. Compare paging and segmentation as memory management schemes.

    Memory Management

    Key points to cover:

    • Paging uses fixed-size units, transparent to the programmer
    • Segmentation uses variable-size logical units (code/data/stack)
    • Notes segmentation can suffer external fragmentation
  3. How does a condition variable work, and what problem does it solve?

    Concurrency & Synchronization

    Key points to cover:

    • Lets a thread wait/block until a specific condition becomes true
    • Signaled by another thread
    • Solves busy-waiting inefficiency compared to polling a flag

Database Management Systems interview questions

  1. What is a subquery, and give an example of when you'd use one.

    Relational Model & SQL

    Key points to cover:

    • A query nested inside another query
    • Useful for filtering based on an aggregate or related table result
    • Gives a concrete example (e.g. rows above a subquery-computed average)
  2. Explain Third Normal Form (3NF) and what problem it solves.

    Normalization & Schema Design

    Key points to cover:

    • 2NF plus no transitive dependency
    • Non-key columns must depend only on the primary key
    • Removes redundancy caused by indirect (transitive) dependencies
  3. Explain the difference between the READ COMMITTED and REPEATABLE READ isolation levels.

    Transactions & Indexing

    Key points to cover:

    • READ COMMITTED prevents dirty reads
    • READ COMMITTED still allows non-repeatable reads within a transaction
    • REPEATABLE READ additionally prevents non-repeatable reads

Computer Networks interview questions

  1. What is the role of the Network layer, and what protocol is most associated with it?

    Networking Fundamentals & OSI Model

    Key points to cover:

    • Handles logical addressing
    • Handles routing of packets between networks
    • Associates it with IP (Internet Protocol)
  2. What is the purpose of TCP's flow control, and how is it achieved?

    TCP/IP & Routing

    Key points to cover:

    • Prevents a fast sender from overwhelming a slow receiver
    • Achieved via a sliding window mechanism
    • Receiver advertises how much data it can currently accept
  3. What is the purpose of TLS/SSL in network security?

    Application Layer Protocols & Security

    Key points to cover:

    • Provides encryption (confidentiality)
    • Provides integrity
    • Provides authentication of the server (and optionally client)

Object-Oriented Programming interview questions

  1. What is abstraction, and how does it differ from encapsulation?

    Core OOP Principles

    Key points to cover:

    • Abstraction exposes only essential features/behavior, hiding complexity
    • Focuses on WHAT an object does
    • Encapsulation is about HOW that hiding is achieved (bundling + access control)
  2. Explain the Strategy pattern and what problem it solves.

    Design Patterns

    Key points to cover:

    • Encapsulates interchangeable algorithms/behaviors behind a common interface
    • Behaviors can be swapped at runtime
    • Solves the problem of many conditional branches selecting between behaviors
  3. Explain the Open/Closed Principle (the 'O' in SOLID).

    Inheritance, Polymorphism & SOLID

    Key points to cover:

    • Software entities should be open for extension but closed for modification
    • New behavior should be addable without changing existing, tested code
    • Typically achieved via abstraction/polymorphism

How to practice Computer Science Engineering interview questions on MockManthan

  1. Create a free account and complete a quick camera, microphone and face calibration.
  2. Pick the Computer Science Engineering subject, chapter and topic you want to practice.
  3. Answer each question out loud to the animated interviewer, then review your scored report — Confidence, Professionalism, Eye Contact and Body Language — with a clickable video timeline.

Mock interview questions for other engineering branches