Elite Coders have it good, I'm envious...

Joined
Apr 3, 2014
Messages
71,910
Reputation
17,458
Daps
306,521
Start with knowing the basic data structures: array, linked lists, trees, tries, etc. and the space/time complexities for each of them.

Neetcode has a good course on it. Learn them as you go. Another decent paid one is Algoexpert. As far as free this guy and playlist is pretty much very thorough:


That playlist is probably the gold standard imo. May have to rewind a few times and he goes fast (and you got to fight an accent every now and then), but if you get that material you can pretty much go into most heavy data structures books and know you've seen it before.

After that familiarize yourself with the patterns that these questions take:

In place reversal of a linked list (like part of what your problem you stated is) is one of those patterns.

The thing is, there are "tricks" to these problems. If you don't know the trick, most likely you ain't solving them unless you're pretty much rare-tier or extremely fortunate to have stumbled on the solution:


I had a really good understanding of data structures and time complexities after I took some courses when I was in college, but still would get my ass handed to me with Leetcode. It wasn't until I learned that there were patterns and general groupings to these questions that I was able to solve these things much easier. For example, all the theory and data structure books I've worked through, I didn't know there was such a thing as a Sliding Window pattern, yet it's a common strategy to solving a certain class of problems and show up in Leetcode often.

From there you can double check your solutions on places like the discussion forums, Neetcode's site/youtube videos, etc. If you don't understand the data structures and algorithm, don't get bogged down where you feel like you have to learn them all upfront before you tackle problems and simply learn them as you go instead (like from some of the links I mentioned).

My rule: try a problem for 30 minutes, if I can't solve it within that time I'll look at the solution and learn what it's doing. No sense spending more time on it because it's not something for work, it's an algorithm question that thousands, maybe millions of people are going to look up the solution for anyways. No sense struggling though a question for a days to weeks and falling behind something they may not even ask in an interview when you can get experience doing another 30 problems within that time. Even problems where I don't understand the solution to 100%, I'll skip so it won't hold me up from solving and learning from all the other ones.

After you learn the solution, go back to it and see if you can solve it again after a few days. Then change something up about the problem and see if you can solve that version of it.






Brehs in the 6 Certs thread clowned me cause I didn't know what a sliding window pattern was :wow:
 

skyrunner1

Superstar
Joined
Mar 11, 2022
Messages
8,393
Reputation
1,924
Daps
27,840
I was thinking that we needed to start a new megathread and get the programming interview game going for thecoli. Being stuck on the 6 certs game is played out. These cacs and asians are killing the interview prep game right now and getting all the FAANG money. There's too few of us brehs on this tip. I've been the only breh in my whole damn department/company for the last 13 years now.
Breh I see dudes ask questions and get told you have to boot strap and read thru entire 1k page thread from 10 years ago meanwhile these other groups preparing they people with exactly what they got to do and forget about all the other BS..

:heh:
 

Aprogressivone

Developers are the new Rockstars
Joined
Sep 7, 2012
Messages
434
Reputation
442
Daps
1,955
Breh, I used to be giving motivational speeches to my friends on some "If I can do it you can do it" bullshyt like that one scene in Save the Last Dance. 🤣



Pretty much everyone I've ever tried to teach quits immediately because they don't have the patience to sit down in front of a computer for long periods of time, don't like learning in general, and don't like getting stuck. Being smart or wanting the money aint enough.

Now when pell me they want to learn to code, and I know they don't have the temperament for it, I just hit that
200w.gif
and keep it moving.


I feel the same way now. I once tried to train a guy who reached out to me. I ended up having to apologize to him lol. I gave this dude a simple ass problem. After a week he came back and said he can't figure it out. I set up a screen share and had him type the question/problem verbatim into Google and the solution came up in all of the top 3 results. I was like breh, how did you not solve this? Dude got all defensive and stuff. He quit. He said I don't appreciate another man talking to me like that. 😂 I'm like how the hell you gonna make it in this industry?
 
Top