Looking to connect with others interested in:
→ Frontend
→ Backend
→ Full Stack
→ DevOps
→ LeetCode
→ AI/ML
→ Data Science
→ DSA
→ Freelancing
→ Startups
If you're building, learning, coding, or growing in tech… Say hi & let's connect 🚀
Bro asked me to find a "balanced" subarray… my life isn't even balanced 💀
LeetCode 3960 - Frequency Balance Subarray just dropped in Weekly Contest 506, basically every element has to show up either f or 2f times. sounds simple until you actually try it 😭
Bro asked me to find a "balanced" subarray… my life isn't even balanced 💀
LeetCode 3960 - Frequency Balance Subarray just dropped in Weekly Contest 506, basically every element has to show up either f or 2f times. sounds simple until you actually try it 😭
📚 DSA Day 2/30
Solved: Subarray Product Less Than K ✅
Leetcode #713
💡 Pattern Used:
Sliding Window
⏱️ Time Complexity: O(n)
📦 Space Complexity: O(1)
Another great problem to strengthen Sliding Window concepts.
#LeetCode#DSA#SlidingWindow#SDESheetChallenge
Two Sum solved in Java 🔥
Most people: O(n²) nested loops
Me after 5 mins: O(n) HashMap in one pass
The trick? For each number,
just ask: "Have I already seen (target - this number)?" HashMap says yes → you're done.
#LeetCode#DSA#Java#BuildInPublic
#LeetCode#POTD 2130
Approach:->Find the middle of the linked list using slow/fast pointers, reverse the second half, then traverse both halves together to compute the maximum twin sum.
TC:->O(N)
SC:->O(1)