Day 25/45
1 Balanced parenthesis: keep track of opening brackets and check with closed ones and cancel them out
2 NGE : solved in the brute force, learned about monotonic stack
Day 24/45
1 Implement Stack using Arrays
2 Implement Queue using Arrays
3 Implement Stack using Queue
4 Implement Queue using Stack
First time stack queue daaka ravadam manam, learned them !
#SDESheetChallenge@striver_79@takeUforward_
Day 21/45
Median of 2 sorted array and k th element of 2 sorted array : solved them using brute force approach
Allocate min no of pages, aggressive cows: will never be able to come up with a solution like that , learned it tho!
#sdesheetchallenge@striver_79@takeUforward_
Day 20/45
1 nth root : check every mid^n and adjust size accordingly
2 matrix median : take a list and store all the elements , sort them then return mid
3 Single ele in sorted arr: Did xor approach learned binary search approach
#SDESheetChallenge@striver_79@takeUforward_
Day 18/45
Again tried solving the leftover sums from yesterday, could understand how they work, good experience learning it
Today's sums will be a backlog for tomorrow
#SDESheetChallenge@striver_79@takeUforward_
em cheddam, em cheddam ani anukuntune almost 25 vachesindi ,inkeppudu ra chesedi
and again em cheddam
fkn loop never ends for me
trying to break it , lets see
edokati aithe chestha
3 Job Sequencing Problem : sort jobs by profit in descending order, place each job in the latest available slot before its deadline
#sdesheetchallenge@striver_79@takeUforward_
Day 15/45
1 N Meetings in One Room : sort meetings by end time, pick the meeting if its start time is greater than the last selected meeting's end time
2 Minimum Platforms : sort arrival & departure arrays, use 2 pointers and track platforms needed at each moment
Day 14/45
1 Trapping rainwater : take prefix max , suffix max , then traversed then array and add the difference
2 Remove duplicates from sorted array : using 2 pointer approach
3 max consecutive ones : take a count , update the max #sdesheetchallenge@striver_79@takeUforward_
Day 13/45
1 Rotate LL : Count the length of LL, then find the newhead and join the tail to head
2 Clone LL with rand and next ptr : took a hashmap and stoed the nodes then traversed again and assigned their randoms as well
Rather than relentlessly chasing customers for feedback, organizations should focus on something far more meaningful like taking complaints seriously and resolving them effectively. Asking for feedback is pointless if genuine concerns continue to be ignored.
2 LL cycle 2 : Floyd's cycle to detect the cycle , once the cycle is detected, then we move both pointers till they are equal and return the node
3 Flattening of LL : learned from the lecture , did not solve it
#SDESheetChallenge@striver_79@takeUforward_
Day 12/45
1 Palindrome LL : initially tried reversing the LL and comparing it, then found out it doesn't work that way. Using the tortoise hare approach , reached the midpoint and reversed the second half of LL , compared it with 1st half of the LL