Technical Round Interview Questions

3question(s) · click a question to reveal a sample answer.

  1. What is the difference between an array and a linked list?
    View Sample Answer

    An array stores elements in contiguous memory with O(1) random access but O(n) insertion/deletion in the middle since elements need to shift. A linked list stores elements as nodes connected by pointers/references - insertion and deletion are O(1) once you have a reference to the position, but access is O(n) since you must traverse from the head. Arrays are generally better for fast lookups; linked lists are better for frequent insertions/deletions.

  2. What is the difference between SQL and NoSQL databases?
    View Sample Answer

    SQL (relational) databases like MySQL/PostgreSQL store data in structured tables with fixed schemas and enforce relationships via foreign keys - good for complex queries and strong consistency (ACID). NoSQL databases like MongoDB or Cassandra store data in flexible formats (documents, key-value, wide-column) without a fixed schema - good for horizontal scalability and rapidly changing data models. The choice depends on whether the data is highly structured/relational or flexible/high-volume.

  3. Explain the difference between process and thread.
    View Sample Answer

    A process is an independent program in execution with its own memory space, so processes are isolated from each other and communication between them is relatively expensive (IPC). A thread is a lightweight unit of execution within a process that shares the same memory space as other threads in that process, so threads are cheaper to create and communicate faster, but must be carefully synchronized to avoid race conditions.