omega34
omega34 @PierceZhang34 ·
Replying to @PierceZhang34
Key Takeaways: When range is small → HashSet + loop is clean & fast When range is huge → sorting + adjacent diff might be better Always use min/max given in problem (they exist!) What’s your favorite way to solve this? HashSet or sort? #Array #HashSet
18
Crack Ease
Crack Ease @CrackEase1519 ·
Sharp • Developer-friendly • Quick insight HashSet in Java is simple: ✨ Unique items only 🚫 No duplicates allowed If the value already exists, Java quietly ignores it. Clean data, clean logic. Learn Java the visual way 👇 crackease.comOg6 #Java #HashSzAd
4
Yashwanth Sure
Yashwanth Sure @yaswanthsure2 ·
Day 17 of DSA Grinding Leetcode 3668 : Restore the finishing order BruteForce approach : Taking two for loops and equals the friends and return Optimal Approach : Take Two HashSets and comparing the elements and return it Total Test cases passed: 921/921 #leetcode #DSA #Hashset
2
89