Latest Articles

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

Count the Number of Good Subarrays – Apple OA DSA Problem & Java Solution

Count the Number of Good Subarrays – Apple OA DSA Problem & Java Solution

An interesting subarray-removal problem where the remaining elements must form a strictly increasing array.

Krishna Shrivastava
Sep 11, 2026
Apple OAArraysSubarraysRecursionBacktrackingHashSetBrute ForceJavaContignous Array
Read More
LeetCode 3483: Unique 3-Digit Even Numbers – Java Backtracking Solution

LeetCode 3483: Unique 3-Digit Even Numbers – Java Backtracking Solution

Generate all possible three-digit numbers with backtracking, handle duplicate digits correctly, and count only distinct even numbers.

Krishna Shrivastava
Sep 11, 2026
LeetCodeJavaBacktrackingRecursionHashSetArraysPermutationsStringEasy
Read More
LeetCode 2086: Minimum Number of Food Buckets to Feed the Hamsters – Java Greedy Solution

LeetCode 2086: Minimum Number of Food Buckets to Feed the Hamsters – Java Greedy Solution

Solve the hamster feeding problem using a simple greedy strategy, efficiently placing buckets while detecting impossible arrangements.

Krishna Shrivastava
Sep 11, 2026
LeetCodeJavaGreedyStringSimulationArraysString ManipulationMedium
Read More
LeetCode 2265: Count Nodes Equal to Average of Subtree – Java DFS Solution

LeetCode 2265: Count Nodes Equal to Average of Subtree – Java DFS Solution

Understand subtree sum and node counting with DFS, explore a straightforward recursive solution, optimize it using a shared counter, and finally reach an O(n) postorder solution.

Krishna Shrivastava
Sep 10, 2026
LeetCodeJavaBinary TreeDFSRecursionPostorder TraversalMedium
Read More
LeetCode 845: Longest Mountain in Array – Java Solution with Peak Expansion

LeetCode 845: Longest Mountain in Array – Java Solution with Peak Expansion

Learn how to identify mountain peaks, expand in both directions, and find the longest valid mountain subarray using O(n) time and O(1) extra space.

Krishna Shrivastava
Aug 12, 2026
LeetCodeJavaArraysTwo PointersMedium
Read More
LeetCode 41: First Missing Positive – O(n) Time and O(1) Space Java Solution

LeetCode 41: First Missing Positive – O(n) Time and O(1) Space Java Solution

A complete explanation of the cyclic placement technique for finding the smallest missing positive integer in an unsorted array.

Krishna Shrivastava
Aug 7, 2026
LeetCodeJavaArraysCyclic SortHardHashSet
Read More
LeetCode 55: Jump Game – Java Greedy Solution with Explanation and Dry Run

LeetCode 55: Jump Game – Java Greedy Solution with Explanation and Dry Run

Learn how to solve LeetCode 55 Jump Game using a simple greedy approach by tracking the farthest index reachable at every step.

Krishna Shrivastava
Aug 7, 2026
JavaLeetcodeArrayGreedy ApproachMedium
Read More
LeetCode 1189: Maximum Number of Balloons – Java HashMap and Frequency Counting Solution

LeetCode 1189: Maximum Number of Balloons – Java HashMap and Frequency Counting Solution

SEO Subtitle Learn Multiple Approaches, Frequency Analysis, Dry Run, Complexity Breakdown, and Interview Insights for This Popular String Counting Problem

Krishna Shrivastava
Jun 22, 2026
LeetcodeEasyJavaHashMapFrequency Count
Read More
LeetCode 1833: Maximum Ice Cream Bars – Java Greedy & Counting Sort Solution Explained

LeetCode 1833: Maximum Ice Cream Bars – Java Greedy & Counting Sort Solution Explained

Learn Greedy Algorithms, Counting Sort Optimization, Dry Runs, Complexity Analysis, and Interview Strategies Through This Classic Budget Allocation Problem

Krishna Shrivastava
Jun 21, 2026
LeetCodeMediumJavaSortingGreedy ApproachCounting Sort
Read More
Page 3 of 20 • 179 articles total
Ai Assistant Kas