Solving Leetcode 2872: Find the Maximum K-Divisible ComponentsLeetcode Question Link: https://leetcode.com/problems/maximum-number-of-k-divisible-components/description/ Intuition Initially, I thought of approaching it with array and tree traversal but didn't think of any other method. I got struck on how to pr...2 min read·5p7ro0t.hashnode.devDec 21, 2024
Valid Anagram Solution - LeetCode 242Intuition After seeing the problem statement, I thought of the best one HashMap :)To store the frequency of one string and compare that with another string's frequency. However, we can also minimize the extra computation of importing and implementing...2 min read·5p7ro0t.hashnode.devMay 31, 2023