DAY 11 of #SDESheetChallenge
Q1 had Interesting optimal approach.
-Find the intersection point of Y LL: used hashset, need to remember the optimal approach.
-Detect a loop in LL: fast and slow pointers used.
-Reverse LL in group of given size K: constructive algo type.
DAY 10 of #SDESheetChallengeSecond
Mostly constructive algo questions
-Remove Nth node from the back of the LL:Edge case got me,still solved
-Add two numbers as LinkedList: Very easy.
-Delete Node in a Linked List: Initially did with swap then later thought about O(1)approach.
DAY 9 of #SDESheetChallenge
Second question was interesting, Need to remember these pattern.
- Reverse a LL: Easy peasy
- Find Middle of Linked List: Learnt to use slow and fast pointers
- Merge two Sorted Lists: Easy implementation.
DAY 8 of #SDESheetChallenge
Good Problems need, to practice these again:
- Largest Subarray with K sum: Had figured out the optimal approach for positives
- Count subarrays with given xor K: Prefix xor used
- Longest Substring Without Repeating Characters: constructive algo.
DAY 7 of #SDESheetChallenge-
- Two Sum: Easy peasy (used map, o(n)
- 4 Sum: standard(o(n3) approach)
- Longest Consecutive Sequence in an Array: Easy peasy(applied o(nlog(n)) and o(n) approaches)
DAY 6 of #SDESheetChallenge
- Majority Element-II: Easy peasy (used modified moore voting algo)
- Grid unique paths: solved using recursion and memoization method approch
- Reverse Pairs: Again I had intution of merge sort, but was not able to implement it.
DAY 5 of #SDESheetChallenge
- Search a 2d matrix: Easy peasy (used binarysearch twice for getting row and one for column)
- pow(x, n): used stl, then o(n) aproach, o(logn) was in my mind but was unable to implement it.
- Majority Element 1: applied Moore Voting Algorithm
DAY 4 of #SDESheetChallenge
- Find duplicate number's optimized approach blowed my mind. The mathematics behind it 🤯... (https://t.co/ZjozP54hHh)
- Find Missing and Repeated Values: Easy Peasy !
- count the number of inversions: Still feels hard.
Last week was one of my most Productive week, I have shared all my learning from my GSoC Project over here: GSoC Journal: Week 4 - A Week of Building, Reviews, and Unexpected Deep Dives https://t.co/KiCGumgWrd
Completed Arrays-1 from SDE sheet, will try to manage it with ongoing GSoC project.
Next permutation was hard for me, but once I got the observation It was just a easy question.
#SDESheetChallenge
@Mosinshaikh7437@oppiaorg Yep , the proposal has a Predefined format and it contains everything from contributors introduction to all the code implementation that would be done in project. Even 3rd party failure has also been considered in it.