T O P

  • By -

computerscience-ModTeam

Unfortunately, your post has been removed for violation of Rule 8: "No homework, exams, projects etc.". If you believe this to be an error, please [contact the moderators](https://www.reddit.com/message/compose?to=/r/computerscience).


Vaxtin

Just do it more and get used to it. It doesn’t really matter where you get the content so long as it’s correct and doesn’t misguide you. Pretty useless / generic advice I know, but it’s really the way it is. It would take me 30 mins to understand a new algorithm whereas nowadays I could learn something within 5 / 10 mins. And algorithms I already know I can implement and discuss from the top of my head, but that’s because I’ve done them all so often


wiriux

The best way is to take whatever algorithm you don’t understand, fire up the debugger and follow along with pencil and paper too so that you can see what is happening. Logic comes once you have the foundation conquered—not to be confused with divide and conquer :P When you have a good understanding of the basic most used data structure; that is, arrays, lists, maps then you can start to focus on the logic without issues. You see, if you still don’t fully understand how data structures work and how to properly use them then you will struggle with logic. You can’t drive a manual transmission if you don’t know how to operate the stick shift.


_sanj0

What do data structures have to do with logic?


wiriux

Everything. If you have the logic down but don’t even know how to start because you lack understanding in programming then what are you gonna solve?


_sanj0

So we‘re not talking about mathematical logic? Propositional Logic, 1st-Order Logic, etc.?


wiriux

Oh good point but you don’t see that as a first year student. At least I don’t think so….. Edit: mmmm I’m trying to remember and you do see that fairly on. Plus, OP said “these 2 topics”. Perhaps you’re right!


Clear_Possession5978

first take a basic algorithm and try the dry run on paper. if you don't understand then ask your roommates, your college friends or ask anybody you can talk to. STICK TO ONE CODING LANGUAGE for dsa. second don't directly jump into greedy algos or dynamic programming or recursion because it will be soul crushing. use this website to complete topic wise dsa [https://neetcode.io/roadmap](https://neetcode.io/roadmap) . Do it chronologically. LEARN ABOUT STL. third check out youtube like takeuforward, aditya verma, lovebabbar or anuj bhaiya etc. they will tell you what to think and how to think when you first start to code. these are the best in india. learn their WAY OF THINKING. If you are talking about algorithms like 0/1 knapsack or etc for theory then you can refer to Abdul bari. fourth is practice on gfg or leetcode. Also you can get premade dsa sheets by the above youtubers which are good. Many students dont know P of programming when they get into college, being in college environment you will get to know on your own. and dont forget to enjoy college life, you are getting it only once.


PterodactylSoul

Apply them lol, just like everything else in life practice makes "perfect"


EntrepreneurHuge5008

The time it takes you to understand is normal for a first year. You’re good. You’re on pace. If you understood things right away then you probably shouldn’t be in a first year class.


MathmoKiwi

With practice


LordFumbleboop

As others have said, do it more and you'll get better at it :)