0% found this document useful (0 votes)
2 views2 pages

Interview Questions Notes

The document summarizes key interview questions and answers related to computer science concepts, including Bloom Filters, sorting algorithms, concurrency vs parallelism, the CAP Theorem, idempotency in distributed systems, reactive programming, and differences between MongoDB and Cassandra. It highlights the characteristics and use cases of various data structures and programming paradigms. Additionally, it provides an overview of Elasticsearch and its components.

Uploaded by

naveenkumar3124
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Interview Questions Notes

The document summarizes key interview questions and answers related to computer science concepts, including Bloom Filters, sorting algorithms, concurrency vs parallelism, the CAP Theorem, idempotency in distributed systems, reactive programming, and differences between MongoDB and Cassandra. It highlights the characteristics and use cases of various data structures and programming paradigms. Additionally, it provides an overview of Elasticsearch and its components.

Uploaded by

naveenkumar3124
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Interview Questions Summary

1. What is a Bloom Filter?

A Bloom Filter is a probabilistic data structure used to test whether an element is a member of a set.

It may return false positives but never false negatives. It is space-efficient and fast.

2. When would you prefer QuickSort vs MergeSort?

Use QuickSort if you have large memory (RAM) and need in-place sorting. Use MergeSort if working

with large disk-based data as it performs well with sequential reads and has consistent O(n log n)

time.

3. What is the difference between concurrency and parallelism?

Concurrency is when multiple tasks make progress by interleaving on the same processor (can be

single core). Parallelism is when multiple tasks run at the same time on multiple processors.

4. Does parallelism always offer linear speedup?

No. Due to overheads like synchronization, communication, and Amdahl's Law, parallelism does not

always result in linear speedup.

5. What is the CAP Theorem?

The CAP Theorem states that in a distributed system, you can only guarantee two out of three:

Consistency, Availability, and Partition Tolerance.

6. How can idempotency be achieved in distributed systems?

One strong way is to attach a unique ID to every request. The server uses this ID to detect and

ignore duplicates. This is often the most reliable approach.

7. What is Reactive Programming?

Reactive programming is a paradigm for handling asynchronous data streams and events. It focuses

on data propagation and reacting to changes over time.

8. How does async behavior work in reactive programming?

Reactive programming uses async streams to avoid blocking. Instead of waiting for data, you
subscribe to it and define what to do when it arrives.

9. Difference between MongoDB and Cassandra?

MongoDB is a document-oriented DB suitable for flexible schemas and rich queries. Cassandra is a

wide-column store, best for high write throughput and horizontal scalability.

10. What is Elasticsearch and what are its basic components?

Elasticsearch is a distributed search and analytics engine. It includes components like Index,

Document, Shard, Replica, and supports powerful full-text search.

You might also like