Latest Articles

Discover our latest posts and insights from the Kode$word journey

Ceil in BST – Java Recursive Binary Search Tree Solution with Dry Run

Ceil in BST – Java Recursive Binary Search Tree Solution with Dry Run

Learn how to solve the Ceil in BST problem using an optimized recursive BST approach in Java. Includes intuition, brute force method, optimized recursion, dry run, time complexity, interview explanation, and common mistakes.

Krishna Shrivastava
Jun 1, 2026
Binary Search TreeBSTJavaRecursionGFGMedium
Read More
LeetCode 98: Validate Binary Search Tree – Java DFS Recursive Solution Explained

LeetCode 98: Validate Binary Search Tree – Java DFS Recursive Solution Explained

Learn how to solve LeetCode 98 Validate Binary Search Tree using recursion and min/max bounds in Java. Includes BST intuition, brute force approach, optimized DFS solution, dry run, complexity analysis, interview explanation, and common mistakes.

Krishna Shrivastava
Jun 1, 2026
LeetCodeBinary Search TreeBSTJavaDFS TraversalBinary TreeRecursionMedium
Read More
LeetCode 2144: Minimum Cost of Buying Candies With Discount – Java Greedy Approach Explained

LeetCode 2144: Minimum Cost of Buying Candies With Discount – Java Greedy Approach Explained

Learn how to solve LeetCode 2144 Minimum Cost of Buying Candies With Discount using a greedy sorting approach in Java. Includes intuition, brute force approach, optimized solution, dry run, complexity analysis, interview explanation, and common mistakes.

Krishna Shrivastava
Jun 1, 2026
LeetCodeJavaSortingArrayGreedy ApproachEasy
Read More
LeetCode 235: Lowest Common Ancestor of a Binary Search Tree – Java BST Solution with Dry Run

LeetCode 235: Lowest Common Ancestor of a Binary Search Tree – Java BST Solution with Dry Run

Master LeetCode 235: Lowest Common Ancestor in a BST using Java. This guide covers the core intuition, brute force method, and optimized recursive solution, plus a detailed dry run, complexity analysis, interview tips, and common pitfalls to avoid.

Krishna Shrivastava
May 31, 2026
LeetCodeBinary Search TreeBSTJavaTreeMedium
Read More
LeetCode 2126: Destroying Asteroids – Java Greedy Algorithm Solution with Dry Run

LeetCode 2126: Destroying Asteroids – Java Greedy Algorithm Solution with Dry Run

Learn how to solve LeetCode 2126 Destroying Asteroids using a Greedy Algorithm in Java. Includes sorting intuition, brute force approach, optimized solution, dry run, complexity analysis, interview explanation, and common mistakes.

Krishna Shrivastava
May 31, 2026
LeetCodeGreedy AlgorithmJavaSortingArrayMedium
Read More
LeetCode 230: Kth Smallest Element in a BST – Java Recursive Inorder Traversal Solution

LeetCode 230: Kth Smallest Element in a BST – Java Recursive Inorder Traversal Solution

Learn how to solve LeetCode 230 Kth Smallest Element in a BST using inorder traversal in Java. Includes BST intuition, brute force approach, optimized recursive solution, dry run, complexity analysis, interview explanation, and common mistakes.

Krishna Shrivastava
May 30, 2026
LeetCodeKth Smallest Element in BSTBinary Search TreeJavaInorder TraversalBSTMedium
Read More
LeetCode 701: Insert into a Binary Search Tree – Java Recursive Solution with Dry Run

LeetCode 701: Insert into a Binary Search Tree – Java Recursive Solution with Dry Run

Learn how to solve LeetCode 701 Insert into a Binary Search Tree using recursion in Java. Includes BST intuition, brute force approach, optimized recursive solution, dry run, complexity analysis, interview explanation, and common mistakes.

Krishna Shrivastava
May 30, 2026
LeetCodeBSTBinary Search TreeJavaRecursionTreeMedium
Read More
Search in a Binary Search Tree (LeetCode 700) Java Solution with Explanation and Dry Run

Search in a Binary Search Tree (LeetCode 700) Java Solution with Explanation and Dry Run

Learn how to efficiently search for a value in a Binary Search Tree using Java with step-by-step explanation, intuition, recursion approach, dry run, and complexity analysis.

Krishna Shrivastava
May 30, 2026
LeetCodeBinary Search TreeJavaBSTEasyTreeRecursion
Read More
LeetCode 3121: Count the Number of Special Characters II – Java HashMap Solution Explained

LeetCode 3121: Count the Number of Special Characters II – Java HashMap Solution Explained

Learn how to solve LeetCode 3121 Count the Number of Special Characters II using HashMap in Java. Includes intuition, brute force approach, optimized solution, dry run, complexity analysis, interview explanation, and common mistakes.

Krishna Shrivastava
May 27, 2026
LeetCodeJavaHashMapStringMedium
Read More
Page 2 of 17150 articles total
Ai Assistant Kas