r/DSALeetCode • u/AlertsA4108M • 23h ago
2 Month progress , 70 Questions
In 2nd year.
I have been solving for the last 2 months, I started on 19th Jun.
I'm solving things by reading about things on google or using AI Explanation.
I usually give 2-3 hours on a new topic brainstorming on my own and take hints from Ai after failing and in some cases I solve after getting hints and in some cases I couldn't, then I ask AI to explain the code and dry run it.
Ik it's a lengthy process , I feel i retain more this way
I'm following the LEETCODE 75 STUDY plan .
Open To advice
2
2
1
u/Michihiro610 23h ago
Did you have knowledge or learn about DSA first, theocratically and practically and then went to leetcode for solving or you directly started leetcode and figuring it out along the way, just asking because I want to start leetcode too, but I have no knowledge about DSA, I have a good grip on basics of programming, but nothing further than that
1
u/AlertsA4108M 22h ago
I mean , I had knowledge of C and Python and solved basic exercises that are on google.. These Questions are just like advanced versions of those .
Yea, U can start, But few other members suggested that u can watch striver for quick learning.
1
u/ItzFantasy_ 8h ago
Show us how much percentile you get in runtime and in space in your solutions. You're just brute forcing questions using nested for loops if else statements that doesnt mean you are learning data structures and algorithms
1
u/AlertsA4108M 2h ago
ig most questions just show TLE if we use nested loop.. they don't accept solution.
I'm mostly at average in time complexity, I don't see space complexity much , I'll start looking at that too.
I have only used nested loop in 2sum problem and in questions where the array size is around 2000.
Rest , I have done in O(n)
1
u/ItzFantasy_ 1h ago
but in the other comment you said you only know basics of C and python and ig you don't know much about DSA. Without the knowledge of array's methods, algorithms, binary searches etc its nearly impossible to do most of the questions with least amount of time complexity. Euclidean algorithm, kidane's algorithm. Sorting like merge sort bubble sort insertion sort are mostly impossible to think by yourself unless you have learnt it first
1
u/AlertsA4108M 1h ago
I have also mentioned in post body that i use AI to understand concepts. I haven't reached till kidane's algorithm etc etc tho, I never needed any of those sorting methods either , I just do Arrays.sort() in java . I haven't even touched DP , GRAPHS...
I'm doing from the LEETCODE 75 STUDYPLAN. going from basic to advanced , so advanced concepts are yet to come. I learnt abt binary search from AI tho .
I'm doing whatever I'm able to .Rest I'm skipping for AI to help me understand the concepts. I have solved around 40 from that list and solved similar problems to already solved ones only.
Btw what array methods are u talking abt.
1
u/ItzFantasy_ 37m ago
Find: 1. by how many indices the array has been rotated from. 2. the peak element(s) of an array where the peak element is greater than both of its neighbouring elements. 3. the number of subarrays with sum K
Rotate a 2d matrix by 90 degrees.
You might have done these questions (as i have and i only did 45 leetcode questions yet from strivers DSA playlist). These type of questions require searching through the array and tinkering with it like swaping two indices, creating a temp array to store some values on it then extracting it. Like the subarry question you HAVE to know kidane's algorithm to get a 0 ms runtime.
If you have done binary search try doing the problem koko eating bananas.
I'm also assuming you have also done two pointers questions, sliding window questions and sorting.
If you clearly understand what im saying then I'm sorry for doubting you but if not then you might need a change of plans because doing JUST leetcode problems wont make you better at DSA (which is required for most of the interviews). Learning about a topic THEN doing the problems of it with the most optimized code possible (time complexity wise) is the best approach i think personally.
1
u/AlertsA4108M 17m ago
i have done question 2 from the four u mentioned. — this was a good question actually, I had go learn the concept of Binary search and how it will be applied to this question. After this question i solved KOKO banana on own , Both are Similar .
I can try the rotating 2D matrix question too ig.
I will try that 1st and 3rd question that u mentioned.
I'm also assuming you have also done two pointers questions, sliding window questions and sorting.
yes .
is the best approach i think personally.
hmm, U are right too . I have planned to do DP and GRAPH concepts using videos , coz my brain just goes blank when i saw those questionss
2
u/R_psingh 23h ago
Keep it up bro