ASAmit singhinyesamitsingh.hashnode.dev·Jun 11 · 3 min readDirection Arrays in Grid ProblemsDirection arrays are used in grid-based problems to move in the four or eight possible directions without writing separate code for each move. Why Use Direction Arrays? Without direction arrays: row -10
ASAmit singhinyesamitsingh.hashnode.dev·May 25 · 4 min readThe Most Common Doubt in DSU: Path Compression + Union by RankWhen learning DSU (Disjoint Set Union / Union Find), almost every student eventually gets this doubt: “Path Compression reduces the height of the tree. Then why don’t we update the rank?” And then c10
ASAmit singhinyesamitsingh.hashnode.dev·Apr 2 · 3 min readBlog: HashSet in Java (Easy Explanation)1. What is HashSet? HashSet is a class in Java that stores unique values only (no duplicates allowed). It is part of Java Collection Framework. Simple meaning: HashSet is used when we want to store e00
ASAmit singhinyesamitsingh.hashnode.dev·Apr 1 · 4 min readHashMap in Java – Easy Blog for BeginnersIntroduction If you are learning DSA or Java, HashMap is one of the most important topics. Many problems like Sliding Window, Prefix Sum, Two Sum, Anagrams, etc. use HashMap. In simple words: HashMap00
ASAmit singhinyesamitsingh.hashnode.dev·Mar 27 · 2 min readArrays in java newIntroduction When we start learning Java, one of the most important topics is Arrays. Arrays are used in almost every program, whether you are building simple applications, solving coding problems, or00