June recap.
113 → 125 problems. +12.
Finished the Hard array FAQs.
Topics: 3 Sum, 4 Sum, Kadane's, Next Permutation, Majority Element II, Count Inversions, Reverse Pairs, Merge Without Extra Space.
Most productive month yet.
Happy\.
#DSA#TUF#Striver#CodingJourney
Day 33 of DSA grind.
Solved 4 Sum all three ways:
->Brute - Checked every possible quadruplet to find the target sum
-> Better - Reduced unnecessary computations using hashing
-> Optimal - Used sorting and the two-pointer technique
#DSA#TUF#Striver#Day33#coding
Day 32 of DSA grind.
Solved 3Sum two more ways:
-> Better - hashset to find third element, set to avoid duplicate triplets
-> Optimal - sort + two pointers, skip duplicates in-place
clicked \
#DSA#TUF#Striver#Day32#coding
Day 31 of DSA grind.
Revised Pascal's Triangle + Rotate Matrix .
Solved two problem more :
-> 2 Sum (brute→better→optimal)
-> 3 Sum (brute)
Back on track \
#DSA#TUF#Striver#Day31#coding
Solved a Stripe problem today
https://t.co/UQIjDE83we
Scary bitwise equation → simplified to:
A[i] + (A[i] ⊕ A[j]) = K
O(N) solution using HashMap.
Key: learn the identities, not the tricks.
Full breakdown on Medium : https://t.co/RMACSJ3mN3
#DSA#BitManipulation#CPP#Stripe
Day 30 of DSA grind.
Solve-Rotate Matrix by 90 degrees (Optimal).
Intuition: Instead of using an extra matrix, we can rotate the matrix in-place by performing two operations:
Transpose the matrix ->>Reverse each row
Space Complexity - O(1)
#DSA#TUF#Striver#Day30#coding
Day 29 of DSA grind.
Solve-Rotate Matrix by 90 degrees (brute force).
Intuition: first row of original -> last column of new matrix.
Map each element as ans[j][n-1-i] = matrix[i][j].
O(n²) time, O(n²) space.
Solve optimal tomorrow.
Hard day .\
#DSA#TUF#Striver#Day29#coding
Day 28 of DSA grind.
Solved all 3 Pascal's Triangle problems today.
I — single element: C(r-1, c-1). O(c)
II — nth row: iterative C values. O(n)
III — full triangle: row generator × n. O(n²)
One formula, three problems.
Happy. \
#DSA#TUF#Striver#Day28#coding#CPP
Day 27 of DSA grind .
Solved 2 problems today
Rearrange Array Elements by Sign
-> Brute: extra array, two passes
-> Optimal: two pointer, single pass
Spiral Matrix
-> Shrinking boundaries
-> No visited array needed
See you tomorrow.\
#DSA#TUF#Striver#Day27#coding
Solved one more Leaders in an Array 2 ways.
Brute Force – nested loops, bool flag to check all right elements.
Optimal – traverse right to left, track max seen so far. O(n).
Key insight: if no element to your right is greater, you're the leader.
#DSA#TUF#Striver#Day26#coding
Day 26 of DSA grind.
Solved Majority Element 3 ways.
Brute Force - nested loops.
Hash Map - store frequencies, find who crossed n/2.
Boyer-Moore Voting - different elements cancel out. majority survives as it appears more than n/2 times.
#DSA#TUF#Striver#Day26#coding
Day 25 of the DSA grind.
Completed three more problems of arrays( logic building)
-> Find the Missing Number in Sorted Array
Used the natural number sum approach for an optimized solution.
-> Union of Two Sorted Arrays
Learned the power of the two-pointer technique for merging efficiently.
-> Intersection of Two Sorted Arrays
Practiced element matching and traversal logic using two pointers.
Now moving to the FAQs (medium)
#DSAjourney #TUF #Striver #coding #DSA #Day25
Day 24 of the DSA grind.
Completed two problem of array (Logic Building)
-> Move Zeroes to end
-> Remove Duplicates from Sorted Array
Key insight -- popping while looping = skipping elements. Never again.
Both problems cracked with the same two-pointer pattern —
One pointer reads. One pointer writes. Condition decides what's worth keeping.
#DSAjourney #TUF #Striver #coding #Day24
Day 23 of the DSA grind.
Completed Array Fundamentals :
→ Second Largest Element
→ Maximum Consecutive Ones
→ Left Rotate Array by One
And the last problem — Left Rotate Array by K Places
Key insight: k % n handles cases when k is larger than the array size.
After that, it’s all about using a temp array + pointer shifting logic.
Now moving towards Logic Building in Arrays
#DSAjourney #TUF #Striver #coding #Day23
Just submitted SolSight to @joincolosseum Frontier Hackathon!
AI-powered Solana wallet analyzer — paste any wallet address, get instant plain-English breakdown of on-chain activity.
Built solo with zero Web3 experience.
Live: https://t.co/aDSky88kYg
#Frontier#Solana #BuildOnSolana