Rajat's Notes

Java 21 Spring Boot 3.4.x Spring Cloud 2024.0.x 94 topics
Study mode:

Q&A mode on. Open any topic to see interview questions only.

Reference
🔎
Glossary
Cross-cutting terms buried inside bigger topics: CQRS, Saga, MVCC, Fencing Token, WAL, and more, each linking straight to the exact section
Java Core
OOP in Java
Pillars, SOLID, composition, records, sealed classes
📦
Collections
HashMap internals, HashSet, TreeMap, ConcurrentHashMap, fail-fast iterators
🧠
Memory Model (JMM)
Happens-before, volatile, synchronized, atomics, safe publication
🔀
Threads & Concurrency
ThreadPoolExecutor, CompletableFuture, locks, ForkJoin
Virtual Threads
Project Loom, structured concurrency, scoped values
JVM Internals
Memory areas, G1GC, ZGC, JIT, OOM types, class loading
🧪
JVM Playground
Interactive simulator for memory, GC, and JIT behavior
🧩
Design Patterns
Factory, Builder, Proxy, Decorator, Strategy, Observer, CQRS
🔧
Generics
Type bounds, wildcards, PECS, type erasure, heap pollution
🌊
Streams & Functional Java
Stream pipeline, collectors, flatMap, Optional, method references
⚙️
Bitwise & Hacks
AND/OR/XOR/shifts, odd check, power-of-2, bit flags, XOR tricks, HashMap internals
📜
Version History
What shipped in each version, LTS spoken answers, the 8 → 21 migration story
Spring
🌱
Spring Lifecycle
Bean lifecycle, ApplicationContext, scopes, auto-configuration
🗄️
JPA & Hibernate
Persistence context, N+1, fetch strategies, projections, second-level cache
🔒
Transactions
Propagation, isolation, SAGA, outbox pattern, distributed transactions
🛡️
Spring Security
Filter chain, OAuth2/JWT, method security, CORS, CSRF, async context
🔄
Threads & Async in Spring
@Async, WebFlux, virtual threads, TaskExecutor, reactive pipelines
🧪
Spring Testing
@WebMvcTest, @DataJpaTest, Testcontainers, MockBean, @Async testing, security testing
Distributed Systems
📨
Kafka & Events
Topics, consumer groups, delivery semantics, outbox pattern, error handling
Resiliency
Circuit Breaker, Retry, Bulkhead, Rate Limiter, Service Mesh
🗄️
Redis
Data structures, caching strategies, pub/sub, Lua scripts, cluster mode
🔍
Production Debugging
Incident scenarios: duplicate orders, latency spikes, memory leaks, Kafka consumers, K8s restarts
🗳️
Consensus & Leader Election
Raft, Paxos, ZAB, quorum math, split-brain, Kafka KRaft/etcd/ZooKeeper as instances
🔢
Distributed ID Generation
Snowflake bit layout, UUIDv7, clock skew, worker ID coordination
System Design
📊
Capacity Numbers
RPS, memory sizing, thread pools, latency reference
🌐
HTTP Methods & REST
GET/POST/PUT/PATCH/DELETE semantics, idempotency, status codes by operation, idempotency keys
gRPC, REST & GraphQL
Proto files, 4 streaming modes, Spring for GraphQL, N+1 fix, comparison table, when to use each
🐳
Docker & Kubernetes
Multi-stage Dockerfile, JVM container flags, health probes, requests vs limits, HPA, zero-downtime tricks
📡
Observability
Structured logging, MDC, Micrometer metric types, JVM & HikariCP metrics, distributed tracing, JVM flags, Prometheus alerts
⚖️
System Design Tradeoffs
Queue vs topic, sync vs async, WebSocket vs SSE, monolith vs microservices, Redis structure picker, and links to SQL vs NoSQL / Kafka vs RabbitMQ / sharding
AI Engineering
🤖
AI Engineering Hub
AI vs ML vs MLOps Engineer, 2026 screening checklist, Java/Spring AI vs Python, RAG project gap analysis
🎯
Evals & LLM Testing
Offline eval sets, online evaluation, RelevancyEvaluator/FactCheckingEvaluator, task success/latency/cost
🔌
Agents & MCP
Tool calling, ReAct loop, structured outputs, MCP client/server, LangGraph4j vs Spring AI
📖
RAG Deep Dive
Chunking strategy, SearchRequest tuning, hybrid retrieval + RRF, reranking, pgvector vs dedicated vector DBs
📈
LLM Observability
gen_ai Micrometer metrics, tracing a RAG call, OTel GenAI conventions, cost-per-task, Prometheus/Grafana/Datadog
Frontend & Fullstack
🖥️
Frontend & Fullstack Hub
React vs Angular side by side, Spring/Java-to-frontend concept map, 2026 fullstack screening checklist
⚛️
React
Hooks mental model, reconciliation & keys, React 18 concurrent features, server state vs client state
🅰️
Angular
Standalone vs NgModules, change detection & OnPush, hierarchical DI, RxJS switchMap/mergeMap/concatMap/exhaustMap
🔒
Frontend Security
XSS, CSRF & SameSite, CORS from the calling side, JWT storage tradeoffs, OAuth2 Authorization Code + PKCE
🔗
API Integration Patterns
Auth interceptors, error normalization, TanStack Query caching, secrets-in-bundle gotcha, WebSocket handshake auth
🧩
Fullstack System Design
CSR/SSR/SSG/ISR tradeoffs, Core Web Vitals levers, state architecture at scale, micro-frontends, a11y
Dev Tooling
🌿
Git CLI
Daily workflow, branching, rebasing, undoing changes, bisect, reflog
⚠️
Anti-Patterns
Null Object, Boolean Trap, Anemic Model, Service Locator, @Transactional pitfalls
NeetCode 150
🎯
NeetCode 150 Tricks
Per-problem trick log: patterns to reach for, sorted by problem number
Data Structures & Algorithms
🗺️
DSA Hub & Cheatsheet
Recognition cheatsheet, Tricks Vault, complexity reference, catalog index
Java API Cheatsheet
Character, Integer, String, Math, Arrays, Collections, Map (getOrDefault, computeIfAbsent, merge)
🔁
Recursion vs Backtracking vs DP
The 30-second decision, trigger words, and the same-domain-different-question contrast that flips the technique
🌲
Trees & Binary Trees
Traversals, vertical order (column-index trick), LCA, diameter, BST properties
🔍
Binary Search
Lower/upper bound, rotated array, search-on-answer, boundary & overflow gotchas
👉
Two Pointers
Converging & same-direction patterns, 3Sum, Dutch National Flag, trapping rainwater
#️⃣
Hashing
Complement lookup, frequency count, grouping, prefix sum + hash, longest consecutive
🪟
Sliding Window
Fixed & variable windows, min window substring, have/need counters, monotonic deque max
🔗
Linked Lists
Reversal, fast/slow pointers, Floyd's cycle detection, merge, reorder, copy with random
📚
Stacks, Queues & Monotonic Stack
ArrayDeque, Min Stack, next greater element, histogram, sliding window max
🏔️
Heaps & Priority Queues
Kth largest, top-K, merge K lists, median of stream, two-heap pattern
🕸️
Graphs
BFS, DFS, cycle detection, topological sort, Dijkstra, multi-source BFS
🔙
Backtracking
Subsets, permutations, combination sum, N-Queens, Word Search, pruning strategies
📐
Dynamic Programming (1D)
Fibonacci-style, House Robber, Coin Change, LIS, Decode Ways, patience sort
🔲
Dynamic Programming (2D)
Grid paths, LCS, edit distance, 0/1 knapsack, unbounded knapsack, interleaving string
Prefix Sum & Difference Array
Range queries, subarray sum = k, product except self, 2D prefix sum, range updates
🎯
Greedy & Intervals
Merge intervals, meeting rooms, non-overlapping, jump game, task scheduler, gas station
🔗
Union-Find
Path compression, union by rank, component count, accounts merge, cycle detection
📋
Topological Sort
Kahn's BFS, DFS postorder, alien dictionary, parallel courses, cycle detection
🔢
Arrays & Strings
Kadane's, Dutch National Flag, Boyer-Moore, triple reverse, next permutation, expand palindrome
🌊
BFS
Level-order, shortest path, multi-source, 0-1 BFS, bidirectional BFS
🔎
DFS
Graph/grid/tree DFS, return-value pattern, 3-color cycle detection, state-space DFS
🌳
Tries
Insert/search/prefix, wildcard, Word Search II, binary trie for max XOR
🐢
Fast & Slow Pointers
Floyd's cycle detection, cycle entry, find middle, find duplicate, happy number
📊
Monotonic Stack & Deque
Next greater element, histogram, sliding window max, remove k digits
📉
Segment Tree & Fenwick Tree
Range sum/min/max with updates, BIT inversion count, lazy propagation
🏗️
Advanced Data Structures
LRU Cache, LFU Cache, RandomizedSet, TreeMap patterns, design problems
🎭
DP — Interval & String
Burst Balloons, palindrome subsequence, merge stones, regex matching, wildcard
🔄
Cyclic Sort
Missing number, find all missing, find duplicate, first missing positive
↔️
Sweep Line
Max overlap, skyline problem, My Calendar, event-based processing
LLD
🧱
LLD Hub
HLD vs LLD, repeatable approach, recurring patterns cheat sheet, catalog index
🧭
Method Walkthrough
The 8-step approach run against a real prompt (vending machine), step by step, before you try one cold
🎙️
Delivery Protocol
Narration rulebook: sub-problems first, one "because" per decision, error recovery, speakable lines
🅿️
Parking Lot
Vehicle/spot fit rules, Strategy pricing, extensibility stress-test
🛗
Elevator System
State pattern lifecycle, dispatch Strategy, Observer for arrivals
🚦
Rate Limiter
Token bucket vs sliding window, Factory, distributed Redis stress-test
Databases
🗄️
Database Hub
SQL vs NoSQL decision tree, ACID vs BASE, isolation levels cheat, CAP theorem, full catalog
🔤
SQL Fundamentals
JOINs, aggregations, CTEs, window functions, NULL handling, keyset pagination, Spring JPA patterns
🔍
Indexes
B-tree internals, composite index ordering, covering indexes, partial indexes, GIN/BRIN, index bloat
⚙️
Database Internals
Pages, buffer pool, WAL, checkpoints, MVCC tuple headers, TOAST, autovacuum, dead tuple bloat
📊
Query Planning & EXPLAIN
EXPLAIN ANALYZE, scan types, join algorithms, buffer hits, pg_stat_statements, slow query log
🔒
ACID & Transactions
ACID properties, isolation levels, MVCC, SELECT FOR UPDATE, deadlocks, 2PC, savepoints
📐
Schema Design
Normal forms, FK behaviors, UUID vs BIGSERIAL, soft delete, audit log, jsonb, EAV anti-pattern
⚖️
SQL vs NoSQL
CAP theorem, ACID vs BASE, decision framework, common mistakes, polyglot persistence
📄
Document DBs (MongoDB)
Embed vs reference, CRUD, indexes, aggregation pipeline, transactions, Spring Data MongoDB
📋
Wide-Column (Cassandra)
Partition key, clustering key, query-driven design, consistency levels, CQL, anti-patterns
🔄
Replication & HA
Streaming replication, sync vs async, read replicas, PgBouncer, HikariCP, Patroni failover
🌐
Distributed & Sharding
Range/hash sharding, 2PC, Saga pattern, CockroachDB, when you actually need this
Performance Patterns
N+1, partitioning, materialized views, pool sizing, bulk inserts, caching strategies, vacuum