MMayank Mahajan·5d agoStop Solving Array Problems Randomly: 5 Patterns Every Developer Should KnowA practical guide to Two Pointers, Sliding Window, Prefix Sum, Kadane's Algorithm, and how to recognize the right pattern before writing code12 min read·mayankdev.hashnode.dev5
LLinkjob AI·Nov 4Matrix Diagonal Sum (LeetCode 1572): One Loop, One Center CheckProblem. Given a square matrix mat, return the sum of its primary diagonal and its secondary diagonal. If the size is odd, the center cell sits on both diagonals, so count it only once. The idea For r2 min read·linkjob-ai.hashnode.dev
LLinkjob AI·Nov 3Longest Harmonious Subsequence (LeetCode 594): Count Once, Check NeighboursA harmonious array is one where the maximum and minimum differ by exactly 1. Given an array, return the length of its longest harmonious subsequence. The word "subsequence" is the whole trick: order d2 min read·linkjob-ai.hashnode.dev
LLinkjob AI·Nov 3Palindrome Linked List (LeetCode 234): O(1) Space Without Losing the ListGiven the head of a singly linked list, return true if it reads the same forward and backward. Easy version: copy to an array Push every value into a list and compare it with its reverse. That's O(n)2 min read·linkjob-ai.hashnode.dev
GGowtham Muthuvel·Oct 27Why (a, b) -> a - b Is a Bug in Java Comparatorsa - b comparators overflow and silently mis-sort lists and heaps. Real Java output, the long/double cast traps, and the one-line fixes.8 min read·gowthammuthuvel.hashnode.dev
MMayank Mahajan·Oct 9Maximum Width of a Binary Tree: Counting the Nodes That Aren't ThereA BFS story about empty positions, heap-style indexes, and why re-basing keeps your numbers small.5 min read·mayankdev.hashnode.dev5
MMayank Mahajan·Oct 9Lowest Common Ancestor of a Binary Tree (LeetCode 236) Explained Simply in C++From the family-tree idea to a 10-line recursive solution, step by step10 min read·mayankdev.hashnode.dev5
MMayank Mahajan·Oct 6Binary Tree Right Side View: One Node Per LevelUnderstand LeetCode 199 once, then solve it twice with right-first DFS and level-order BFS.10 min read·mayankdev.hashnode.dev5
AAbirami Sri·Sep 24Day 13 of My DSA Journey — Linked List Operations & Pointer ManipulationLinked List patterns by solving Design Linked List, Remove Nth Node From End, Rotate List, and Odd Even Linked List using dummy nodes & 2 pointers.13 min read·abi-blog.hashnode.dev
AAbirami Sri·Sep 23Day 12 0f My DSA Journey with JavaScript — Linked List PatternsLearn Linked List patterns in JavaScript by solving Reverse Linked List, Middle Node, Linked List Cycle, and Intersection of Two Linked Lists.7 min read·abi-blog.hashnode.dev