Day 13/45 - #SDESheetChallenge
Today's problems | Topic - Linked List and Arrays
1. 3 Sumβ
2. Clone a LL with random and next pointerβ
3. Rotate a LLβ
#DSA#java#Consistency
π Day 13/45 #SDESheetChallenge
β Solved:
β’ Rotate a Linked List
β’ Copy Linked List with Random Pointer
β’ 3 Sum
π‘ Worked on Linked List manipulation, random pointer cloning, and Two Pointers today.
@takeUforward_@striver_79
Day 13 of #SDESheetChallenge
Clone a LL with random and next pointer taught me two things -
1] Don't fear from the question language, just be patient and understand
2] Use map for mapping nodes for the future use
@striver_79@takeUforward_
day 10/45-
- remove nth node from end (keep n gap b/w slow & fast pointer)
- add 2 nums ( traverse both ll , add node vals of each ll use % for carry)
- delete node in ll ( copy value of next node)
fomo of posting late is real,will cover up the lags today!!
#SDESheetChallenge
Day-12
> 3 questions from #SDESheetChallenge by @takeUforward_@striver_79
- Check if LL is palindrome or not
- Find the starting point in LL
- Flattening of LL
> Wrote article about prompts in LangChain
> Codeforces contest
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
Done with Day 13 of #SDESheetChallenge
1.Rotate List: Change connection
2.Copy List with Random pointer: Using hash map
3.3Sum: Sort and find triplets, skip duplicates.
@striver_79@takeUforward_