Day 13: #SDESheetChallenge
Rotate a LL - done with O(N) TC and Constant Space
3 Sum- Done with O(n^2) TC and Constant Space
Clone a LL with random and next pointer- done with brute method.
✅
@takeUforward_@striver_79
Day 10- #SDESheetChallenge
Done Remove nth node from back, add two numbers (good question- would have been scary if had it asked reverse), Delete Node
All done in Optimal TC and SC
@takeUforward_@striver_79
Day 9- #SDESheetChallenge
Time for some Linked Lists codes-
Reverse a linked list: Solved with brute and optimised code [SC dropped from O(n) to O(1)]
Find Middle or linked list: Optimal rabbit hare method
Merge two sorted lists (solved using brute)
@striver_79@takeUforward_
Day 8- #SDESheetChallenge
Longest Subarray with sum k- Done with prefix sum hashmap with O(n) TC & SC;
Count subarrays with xor k- done with O(nlogn) TC & O(n) SC;
Longest Substring without repeating Characters O(n), O(k) TC & SC respectively
@striver_79@takeUforward_
Day 7- #SDESheetChallenge
Done- 2 sum (with map- O(n) TC & SC);
4 sum (sort two pointers- O(n^3) TC and O(n) SC);
Longest Consecutive Subsequence -(O(n) TC & SC).
One week down for this challenge! 🚀✅
@takeUforward_@striver_79
Did midnight cycling in Mumbai last night. Worli to fort and back to Worli. Can never get enough of how beautiful the city looks at night. Definitely recommend! 🌉🌃❤️
#mumbai
Day 6 - #SDESheetChallenge
Done- Majority Element II, Grid unique paths (loved solving basic 2d dp problem in between these array problems), reverse pairs (merge sort application, looks like a problem that'll need more revisits) ✅
@striver_79@takeUforward_
Day 5 - #SDESheetChallenge
✅Search in matrix- Binary Search- done in O(log mn);
✅Pow(x,n)- Recursion- done in O(log n) TC & SC- to write in log n requires a small & imp observation;
✅Majority Element- BM vote algo- O(N) TC and O(1)SC;
@striver_79@takeUforward_
Day 3 - #SDESheetChallenge
✅Rotate Matrix= transpose reverse each row
✅Merge Overlap= sort compare prevEnd & currStart
✅Merge Two sorted Arrays without extra space= two pointers sort.
Good revision especially for the third problem.
@striver_79@takeUforward_
Day 1 of the #SDESheetChallenge.
Solved all three problems of the day. Had a really long and hectic day due to work- had to skip gym for this, but the start of such promising challenge is always worth it. 🚀👨🏻💻✅
#SDESheetChallenge@striver_79@takeUforward_