Latest Articles

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

LeetCode 769: Max Chunks To Make Sorted – Java Solution, Approach & Explanation

LeetCode 769: Max Chunks To Make Sorted – Java Solution, Approach & Explanation

Learn how to split a permutation into the maximum number of independently sortable chunks using recursion, partitioning, and a greedy optimization.

Krishna Shrivastava
Sep 14, 2026
LeetCodeJavaRecursionBacktrackingGreedyArraysSortingPermutationPartitioningMedium
Read More
LeetCode 836: Rectangle Overlap – Java Solution, Explanation & Approach

LeetCode 836: Rectangle Overlap – Java Solution, Explanation & Approach

Check whether two axis-aligned rectangles have a positive-area intersection using simple coordinate and boundary conditions.

Krishna Shrivastava
Sep 14, 2026
LeetCodeJavaRectangle OverlapGeometryArraysCoordinatesMathEasy
Read More
LeetCode 835: Image Overlap – Java Matrix Translation Solution

LeetCode 835: Image Overlap – Java Matrix Translation Solution

Find the maximum overlap between two binary images by translating one matrix in every possible direction.

Krishna Shrivastava
Sep 13, 2026
LeetCodeJavaMatrixArraysSimulation2D ArraysMatrix TraversalMedium
Read More
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
Page 1 of 19164 articles total
Ai Assistant Kas
Blog | Kode$word