| JAVA ENGINE & FRAMEWORK |
| |
| +---------------------+ +---------------------+ |
| | Java Core | | Spring Framework | |
| | - JVM Internal Mem | | - Spring Boot Core | |
| | - Garbage Collection| | - Dependency Inj. | |
| | - HashMap / Arrays | | - Spring Data / ORM | |
| +----------+----------+ +----------+----------+ |
| | | |
| +-------------+-------------+ |
| | |
| +-----------v-----------+ |
| | Dynamic Concurrency | |
| | - Thread Safety/Locks | |
| | - Execut. Framework | |
| +-----------------------+ |
+-------------------------------------------------------+
**Be ready to go over:**
- **JVM Internals & Memory Model** – Understanding Heap vs. Stack memory allocation, Garbage Collection algorithms (G1GC, ZGC), and class loading mechanics.
- **Multithreading & Concurrency** – Working with synchronized blocks, reentrant locks, thread pools (`ExecutorService`), concurrent collections (`ConcurrentHashMap`), and race conditions.
- **Spring Boot & Microservices** – Core dependency injection, bean scopes, Spring Data JPA, transaction management (`@Transactional`), and RESTful API design principles.
- **Advanced concepts (less common)** – Java Memory Model memory barriers, volatile variable visibility guarantees, custom class loaders, and byte-code manipulation.
**Example scenarios:**
- "Explain how a `ConcurrentHashMap` achieves high concurrency during read and write operations without locking the entire map."
- "Walk me through a production issue where a Java application experienced high CPU utilization due to thread starvation or infinite looping in legacy collections."
- "How do you handle cascading failures across distributed Spring Boot microservices using circuit breakers?"
### Data Structures & Algorithms
Algorithmic rounds evaluate your ability to solve practical coding tasks efficiently while writing clean, readable code within time constraints.
**Be ready to go over:**
- **Arrays, Strings, & Sliding Window** – Array manipulation, two-pointer techniques, and string parsing logic.
- **Trees, Graphs, & Searching** – Traversal patterns (DFS/BFS), binary search trees, and shortest path algorithms.
- **Stacks, Queues, & Hash Tables** – Implementing custom data structures, evaluating expressions, and tracking frequencies.
- **Advanced concepts (less common)** – Advanced dynamic programming optimizations, trie structures for auto-complete, and segment trees.
**Example scenarios:**
- "Given a stream of real-time trade prices, write an algorithm to track the moving average over a sliding time window."
- "Implement a custom LRU (Least Recently Used) cache with $O(1)$ lookup and insertion time complexity."
### System Design & Scalability
System design interviews measure your ability to architect large-scale systems. You must demonstrate an understanding of operational stability, security, data integrity, and low latency.
+
| Client App |
+
|
v
+
| API Gateway |
+
|
+
| |
v v
+--------------------+ +--------------------+
| Transaction Serv. | | User Profile Serv |
+----------+---------+ +----------+---------+
| |
v v
+--------------------+ +--------------------+
| Relational DB (SQL)| | NoSQL / Redis Cache|
+--------------------+ +--------------------+
**Be ready to go over:**
- **Database Architecture & Data Consistency** – Choosing between SQL (ACID compliance) and NoSQL (eventual consistency) for financial records.
- **Caching & Performance** – Implementing multi-level caching strategies using Redis or Memcached to minimize database load.
- **Microservice Communication** – Synchronous REST/gRPC vs. asynchronous messaging using Apache Kafka or RabbitMQ.
- **Advanced concepts (less common)** – Consensus algorithms (Raft/Paxos), distributed transactions (Saga pattern vs. Two-Phase Commit), and database sharding techniques.
**Example scenarios:**
- "Design a real-time notification engine capable of pushing millions of account activity alerts daily."
- "How would you design a distributed transaction processing pipeline that guarantees zero loss of trade orders?"