Find a lesson, question or project

Start typing to search published content and planned structures.

↑ ↓ moveEnter openEsc close

All published articles

Find a lesson across the Atlas. Drafts are not included.

22 Oct 202630 min read

Trees in Java: Roots, Tree Types, DFS and BFS Traversals

Understand tree terminology and shapes, then learn inorder, preorder, postorder and level order with two larger examples, static dry runs and tested recursive and iterative Java.

Data Structures & Algorithms
16 Oct 20269 min read

Basic Calculator III in Java: Parse Precedence and Parentheses

Derive a calculator from grammar levels, with a quadratic baseline, linear recursive descent, commented Java, cursor-by-cursor dry run and integer division rules.

Data Structures & Algorithms
16 Oct 20267 min read

Combination Sum III in Java: Exactly k Distinct Digits

Understand exactly-k digit combinations with a subset baseline, take/skip recursion, safe sum bounds, commented Java and a complete illustrated dry run.

Data Structures & Algorithms
16 Oct 20268 min read

Expression Add Operators in Java: Backtrack Without Losing Precedence

Build every matching arithmetic expression with operand boundaries, signed last-term tracking, leading-zero guards, commented Java and an illustrated dry run.

Data Structures & Algorithms
16 Oct 20267 min read

Letter Combinations of a Phone Number in Java: One Digit, One Choice

Learn phone-keypad backtracking from first principles, with examples, commented Java, a numbered image dry run, state restoration and output-sensitive complexity.

Data Structures & Algorithms
16 Oct 20266 min read

Permutation Sequence in Java: Skip Whole Factorial Blocks

Derive the kth permutation from a backtracking baseline, factorial block sizes and zero-based ranks, with commented Java and an illustrated dry run.

Data Structures & Algorithms
14 Oct 202615 min read

Robot Room Cleaner in Java: Explore Blindly, Return Safely

Derive blindfolded DFS using relative coordinates, keep the robot's direction synchronized, and follow physical backtracking through commented Java and a static dry run.

Data Structures & Algorithms
13 Oct 202613 min read

Confusing Number II in Java: Build Valid Digits, Count Changed Rotations

Understand confusing numbers with digit rotation, valid-digit DFS, a complete recursion tree, commented Java, dry runs and justified complexity.

Data Structures & Algorithms
12 Oct 20266 min read

M-Coloring in Java: Can Every Neighbor Have a Different Color?

Solve graph coloring with tentative assignments, neighbor checks and backtracking; understand why a triangle needs three colors.

Data Structures & Algorithms
12 Oct 20266 min read

N-Queens in Java: Place One Queen per Row, Then Undo

Generate all nonattacking queen boards with row-by-row backtracking, explain diagonal keys and undo, and trace the two solutions for n=4.

Data Structures & Algorithms
12 Oct 20266 min read

Palindrome Partitioning in Java: Choose a Valid Prefix, Partition the Rest

Enumerate palindrome partitions by choosing valid prefixes, copying completed paths and undoing; understand substring costs and minimum-cut differences.

Data Structures & Algorithms
12 Oct 20267 min read

Rat in a Maze in Java: Explore Every Path Without Reusing Cells

Enumerate sorted maze paths with DFS, path-local visited cells and careful undo; handle blocked endpoints and preserve the input grid.

Data Structures & Algorithms
12 Oct 20267 min read

Sudoku Solver in Java: Try a Digit, Recurse, Restore on Failure

Solve Sudoku in place with first-empty-cell backtracking, explain row/column/box checks, and distinguish a safe trial from a complete solution.

Data Structures & Algorithms
12 Oct 20267 min read

Word Search in Java: Match Letters Along One Nonrepeating Path

Find a word through adjacent grid cells using path-local visited marks, short-circuit recursion and restoration, without reusing a cell.

Data Structures & Algorithms
12 Oct 202612 min read

Strobogrammatic Number III in Java: Count Numbers Between String Bounds

Count upside-down-symmetric numbers in an inclusive string range with paired-digit recursion, safe comparisons, commented Java and a dry run.

Data Structures & Algorithms
12 Oct 20265 min read

Brace Expansion in Java: Parse Choices, Then Build Words

Turn flat brace expressions into sorted choice groups, generate their Cartesian product with recursion, and distinguish nested Brace Expansion II.

Data Structures & Algorithms
12 Oct 20265 min read

Combination Sum in Java: Why Taking Keeps the Same Index

Build reusable-candidate combinations with take/skip recursion, understand the remaining target and undo steps, and analyze output-sensitive complexity.

Data Structures & Algorithms
12 Oct 20265 min read

Combination Sum II in Java: Use Each Index Once, Skip Duplicate Branches

Understand i+1, sorted candidate pruning and sibling duplicate skipping with repeated values, a worked target-sum example and commented Java.

Data Structures & Algorithms
12 Oct 20265 min read

Generate Parentheses in Java: Keep Every Prefix Balanced

Build balanced parentheses using remaining counts, understand why close must exceed open, and trace the valid prefix tree.

Data Structures & Algorithms
12 Oct 20265 min read

Next Closest Time in Java: Check the Next Minute, Not the Smallest Clock

Find the next time by bounded minute simulation, correctly handle midnight and unlimited digit reuse, and compare a recursive candidate generator.

Data Structures & Algorithms
12 Oct 20265 min read

Output Contest Matches in Java: Pair the Ends, Recurse by Round

Construct ranked tournament brackets round by round, understand Java reference passing, and count the real String-copying cost.

Data Structures & Algorithms
12 Oct 20265 min read

Permutations of a String in Java: Swap, Restore and Remove Duplicates

Generate sorted unique string permutations using your swap-and-backtrack approach, with per-position duplicate handling and an honest sorting cost.

Data Structures & Algorithms
12 Oct 20265 min read

Pow(x, n) in Java: Halve the Exponent Safely

Learn exponentiation by squaring, negative exponents, Integer.MIN_VALUE safety and the real call chain through commented Java.

Data Structures & Algorithms
12 Oct 20265 min read

Recursive Insertion Sort in Java: Sort the Prefix, Insert the Last Value

Implement insertion sort with no loops, use separate recursive sorting and shifting helpers, and explain stability, the return phase and stack cost.

Data Structures & Algorithms
12 Oct 20265 min read

Reverse a Doubly Linked List in Java: Exchange Both Links

Reverse next and prev pointers in place, trace the saved original-next link, preserve node identity and choose safe iteration for long Java lists.

Data Structures & Algorithms
12 Oct 20265 min read

Strobogrammatic Number II in Java: Fill Matching Ends

Generate upside-down-symmetric numbers by filling two ends together, handling leading zero and odd centers, with code and a visual dry run.

Data Structures & Algorithms
12 Oct 20265 min read

Subsets I in Java: Find Every Subset Sum

Understand take-or-skip recursion by producing every subset sum, with repeated sums, commented Java, a recursion tree and a dry run.

Data Structures & Algorithms
12 Oct 20265 min read

Subsets II in Java: Unique Subsets Without Losing Repeated Values

Generate unique subsets with duplicates using sorted sibling choices, preserve repeated values inside subsets, and understand copying and undo.

Data Structures & Algorithms
12 Oct 20266 min read

The Knight’s Tour in Java: Choose a Move, Explore, Undo

Find a complete knight tour with legal L moves, visited-state backtracking, success-preserving returns, a board example and tested Java.

Data Structures & Algorithms
12 Oct 20266 min read

Word Pattern II in Java: Backtrack a Two-Way Mapping

Understand bijection, two string indices, candidate substrings, successful short-circuiting and undo with a beginner-friendly Word Pattern II solution.

Data Structures & Algorithms
08 Oct 202621 min read

Two Pointers in Java: A Beginner's Guide

Learn two pointers through palindrome checks, sorted pair sums, duplicate removal, merging, and fast/slow linked-list examples, with diagrams and explained Java code.

Data Structures & Algorithms
04 Oct 202612 min read

Permutations III in Java: Alternate Odd and Even with Backtracking

Learn parity-constrained permutations with simple reasoning, commented Java, a recursion tree and dry runs showing choices, returns and undo.

Data Structures & Algorithms
03 Oct 20266 min read

Does a Subsequence with Sum K Exist? Java Recursion and DP

Learn why existence uses short-circuit returns, how take and skip reduce the remaining target, and how bounded subset-sum DP avoids repeated work.

Data Structures & Algorithms
03 Oct 20268 min read

Count Subsequences with Sum K in Java: Choices, Returns, and DP

Understand take-or-skip recursion, non-empty index choices, returned counts, and positive-target dynamic programming with commented Java and a real call tree.

Data Structures & Algorithms
03 Oct 20266 min read

Generate Binary Strings Without Consecutive Ones in Java

Build only valid binary strings, understand every choose-and-undo step, and connect the recursion tree to Fibonacci counts and lexicographic order.

Data Structures & Algorithms
03 Oct 20267 min read

Palindrome Permutation II in Java: Build Half, Then Mirror

Understand odd frequencies, duplicate-free half permutations, shared state restoration, and a step-through recursion tree with fully commented Java.

Data Structures & Algorithms
03 Oct 20265 min read

Print an Immutable Linked List in Reverse: Java Call-Stack Reasoning

Print backward without changing links or reading hidden fields, using recursive returns, an explicit-stack alternative and an API-faithful dry run.

Data Structures & Algorithms
03 Oct 20266 min read

Reverse a Stack in Java: Understand Every Call and Return

Reverse a stack using recursion only, with insert-at-bottom reasoning, LIFO dry runs, commented Java and edge-case tests.

Data Structures & Algorithms
03 Oct 20267 min read

Split a BST in Java: Return Two Trees Without Rebuilding Them

Reason about <=target and >target roots, preserve existing parent-child structure, trace pointer reconnections, and understand O(height) recursion with commented Java.

Data Structures & Algorithms
03 Oct 20267 min read

Stepping Numbers in Java: Grow a Digit Tree Instead of Scanning a Range

Generate sorted stepping numbers with digit-based DFS, boundary checks, safe arithmetic, an actual recursion tree, and beginner-friendly Java explanations.

Data Structures & Algorithms
02 Oct 202653 min read

Java Design Principles for Low-Level Design: A Practical Login Service

Understand SOLID, DRY, KISS, YAGNI, coupling, cohesion, and composition through a Java login service with diagrams, failure cases, and runnable examples.

Low-Level Design
28 Sept 202631 min read

BFS and DFS in Java: A Visual Guide

Learn BFS and DFS with static graph, queue and call-stack traces, tested Java, shortest paths, grids and 12 practical question patterns.

Data Structures & Algorithms
27 Sept 202615 min read

Subarray Sum Equals K in Java: From Brute Force to Prefix Sum

Count subarrays with sum K using a prefix sum and frequency map, with beginner-friendly diagrams, a dry run, Java solutions, and common mistakes.

Data Structures & Algorithms
27 Sept 202615 min read

Prefix Sum in Java: A Beginner's Guide to Range Sums and Subarray Patterns

Learn prefix sums from scratch with visual examples, Java code, recognition clues, common subarray patterns, and mistakes to avoid.

Data Structures & Algorithms
26 Sept 202661 min read

Java OOP for LLD, Part 2: Four Pillars, Relationships, and Generics

Learn Java encapsulation, abstraction, inheritance, polymorphism, access modifiers, class relationships, generics, and wildcards through the MealFlow design.

Low-Level Design
23 Sept 202640 min read

Beyond Backend: The Complete AI Roadmap to Become a Forward Deployed Engineer

A practical AI engineering roadmap from Python and machine learning through LLMs, RAG, agents, MCP, production systems, and Forward Deployed Engineering.

AI Engineering
13 Sept 202629 min read

Solved 200 DSA Problems, So Why Does the Next One Still Feel Impossible?

A practical guide to escaping passive DSA study, recognizing algorithm patterns, debugging independently, and building a practice routine that lasts.

Data Structures & Algorithms
13 Sept 202642 min read

Stop Guessing What to Study: The System Design Interview Roadmap

A structured system design interview roadmap covering requirements, scale, data, caching, distributed systems, reliability, security, and practice.

System Design
03 Sept 202646 min read

Java OOP for LLD: Classes, Objects, Constructors, and this

Learn Java OOP for low level design with classes, objects, constructors, references, shallow and deep copies, and the this keyword through clear examples.

Low-Level Design
03 Sept 202611 min read

Low Level Design Roadmap: From Beginner to Interview Ready

A practical low level design roadmap covering OOP, UML, SOLID, design patterns, concurrency, interview planning, and the systems to practise next.

Low-Level Design
02 Sept 202616 min read

Subsets in Java: From Brute Force to Optimal

Generate every subset of a distinct integer set in Java using bitmasks and backtracking, with a visual dry run and honest complexity analysis.

Data Structures & Algorithms
01 Sept 202614 min read

Recursion in Java: A Beginner's Guide to Thinking in Smaller Problems

Learn recursion in Java through base cases, smaller inputs, call-stack diagrams, Java code and complete static dry runs.

Data Structures & Algorithms
22 Aug 20263 min read

Stop Sending Entire CI/CD Logs to LLMs: Building an Intelligent Failure-Aware Log Reduction Pipeline

Reduce noisy pipeline logs into a small, safe, failure focused context before asking an LLM to explain what went wrong.

Engineering Notes
22 Aug 20263 min read

AI Engineering Foundations

A practical mental model for building AI features that remain useful, measurable, safe, and affordable after the first demo.

AI Engineering
22 Aug 20262 min read

System Design Foundations

Learn the requirements, numbers, data, and failure questions that should come before an architecture diagram.

System Design
22 Aug 20262 min read

Back of the Envelope Estimation

Estimate traffic, storage, bandwidth, and concurrency with simple numbers that guide design choices.

System Design
22 Aug 20267 min read

URL Shortener System Design

Design a reliable URL shortening service from requirements through storage, caching, and failure handling.

System Design
22 Aug 20262 min read

Java Foundations for Backend Engineers

A practical route through the Java concepts that matter when building backend services.

Java, Spring Boot & Microservices
22 Aug 20261 min read

Choosing the Right Java Collection

Compare the Java collections most backend applications use and choose by behavior instead of habit.

Java, Spring Boot & Microservices
22 Aug 20262 min read

How a Spring Boot Request Flows Through an Application

Follow an HTTP request from the controller through validation, business logic, persistence, and the response.

Java, Spring Boot & Microservices
22 Aug 20262 min read

Docker and Container Fundamentals

Understand images, containers, layers, processes, ports, and persistent data before writing Dockerfiles.

Cloud Native
22 Aug 20261 min read

A Production Minded Dockerfile for Java

Build a smaller, safer Java container image with a multi stage Dockerfile and sensible runtime defaults.

Cloud Native
22 Aug 20262 min read

Kubernetes Workload Fundamentals

Understand Pods, Deployments, Services, configuration, health checks, and resource settings as one workload.

Cloud Native
10 Aug 20263 min read

Longest Subarray with Sum K

Use prefix sums and earliest indexes to handle positive and negative values in linear time.

Data Structures & Algorithms
09 Aug 20263 min read

Find the Missing Number

Find the missing value from 1 through n using XOR without overflow.

Data Structures & Algorithms
08 Aug 20263 min read

Union of Two Sorted Arrays

Merge two sorted arrays into a sorted list of distinct values with two pointers.

Data Structures & Algorithms
07 Aug 20263 min read

Move Zeroes to the End

Move every zero to the end while preserving the order of nonzero values.

Data Structures & Algorithms
06 Aug 20263 min read

Rotate an Array to the Left

Rotate an array by k positions in place with the reversal technique.

Data Structures & Algorithms
05 Aug 20263 min read

Remove Duplicates from a Sorted Array

Use read and write pointers to keep one copy of each value in place.

Data Structures & Algorithms
04 Aug 20262 min read

Check Whether an Array Is Sorted

Verify nondecreasing order by checking each adjacent pair once.

Data Structures & Algorithms
03 Aug 20263 min read

Find the Second Largest Element in an Array

Track the two largest distinct values in one pass without sorting the array.

Data Structures & Algorithms
02 Aug 20267 min read

Find the Largest Element in an Array

Learn to keep a running maximum, reason about each comparison, and trace a one-pass Java solution.

Data Structures & Algorithms
01 Aug 20263 min read

Array Fundamentals in Java

Build a clear mental model for array indexing, traversal, updates, and common problem solving patterns.

Data Structures & Algorithms
12 Jan 20242 min read

Arrays Learning Path

Learn array traversal, two pointers, in place updates, hashing, and prefix techniques through Java examples.

Data Structures & Algorithms
12 Jan 20241 min read

System Design Learning Path

A practical route through requirements, estimation, data, communication, reliability, and system design case studies.

System Design