GGowtham Muthuvel2d ago · 8 min readWhy (a, b) -> a - b Is a Bug in Java ComparatorsIf you've solved enough LeetCode problems in Java, you've written this: PriorityQueue<Integer> minHeap = new PriorityQueue<>((a, b) -> a - b); PriorityQueue<Integer> maxHeap = new PriorityQueue<>((a, gowthammuthuvel.hashnode.dev
MManikandan S6d ago · 6 min readTreeMap in Java1. Introduction to TreeMap TreeMap is a Java class that implements the NavigableMap interface. It stores key-value pairs sorted by keys. Syntax TreeMap<KeyType, ValueType> map = new TreeMap<>(); Exammanikandan4411.hashnode.dev
MManikandan SOct 21 · 5 min readLinkedHashMap in Java1. Introduction to LinkedHashMap LinkedHashMap is a Java class that implements the Map interface. It stores key-value pairs and maintains insertion order by default. Syntax LinkedHashMap<KeyType, Valumanikandan4411.hashnode.dev
SswayanprabhaOct 20 · 7 min readStop Thinking Binary Search Is Only for Searching 🔍It’s not an algorithm to memorize. Most of us learn binary search like this: “Sorted array. Find the target. Done.” But the real skill is spotting when it fits, even when the problem has no sorted arrdsadiscuss.hashnode.dev
MManikandan SOct 19 · 6 min readHashMap in JavaIntroduction to HashMap HashMap is a Java class that implements the Map interface. It stores data as key-value pairs. Keys must be unique, but values can be duplicated. It does not guarantee insertionmanikandan4411.hashnode.dev
FFeroan MothyOct 16 · 2 min readLearning to Think in StepsI've started spending time on data structures and algorithms recently. Most of my coding so far has been around building projects, working with APIs, connecting different parts of an application, and feroan.hashnode.dev
MManikandan SOct 16 · 5 min readTreeSet in Java1. Introduction to TreeSet TreeSet is a Java class that implements the NavigableSet interface. It stores unique elements in sorted order. Syntax TreeSet<Type> set = new TreeSet<>(); Example import jamanikandan4411.hashnode.dev
RReal DevOct 15 · 7 min readA 30-Day DSA Plan for Placements, Built Around Patterns (Not Problem Counts)A common way to prepare for placement coding rounds is to open a list of hundreds of problems and start at number one. A month later, a new problem still feels like a blank page. A better approach: le1realdev9868.hashnode.dev
MManikandan SOct 14 · 5 min readLinkedHashSet in Java: Definition, Methods, Syntax and Examples1. What Is LinkedHashSet in Java? LinkedHashSet is a Java class that implements the Set interface. It stores unique elements and maintains their insertion order. Syntax: LinkedHashSet<Type> set = new manikandan4411.hashnode.dev
MMayank MahajanOct 9 · 10 min readLowest Common Ancestor of a Binary Tree (LeetCode 236) Explained Simply in C++Think about your last family gathering. You and your sister are sitting at the same table, and if you trace both of your family lines upward, they meet at one person: your grandfather. He is the close4mayankdev.hashnode.dev