Saturday, March 5, 2022

Leetcode algorithms: Good ideas to learn from Raymond Gan

Good ideas:

1. Jr engineers: I've begun to code ALL 152 LeetCode "Top Classic Interview Questions" in JavaScript: 48 Easy, 52 Medium, + 52 Hard #datastructures + algorithm questions: https://lnkd.in/gCpZVmiK. I hope to post answers to new problems daily on LinkedIn + my GitHub: https://lnkd.in/g-V76cd. Many top companies (like FAANG) ask #leetcode questions in software job interviews.

Buy LeetCode: https://lnkd.in/g2QuZtrh

I posted answers to these 4 "easy" problems:

- Valid Anagram: https://lnkd.in/g7Zz2bmT
- Reverse Linked List: https://lnkd.in/gS3zZncz
- Remove Duplicates From Sorted Array: https://lnkd.in/g9wCpxa4
- Best Time to Buy + Sell Stock 2: https://lnkd.in/gpia8jxZ

Why? 8 years since finishing my coding bootcamp, I've met hundreds of bootcamp grads very WEAK in Data Structures + Algorithms (DS&A). They often fail LeetCode type software interviews + are scared, frustrated, + clueless on how to teach themselves this difficult skill. Failing #algorithms questions is often the #1 thing that gets them rejected! They struggle alone.

Most bootcamps do a horrible job teaching DS&A, rushing through a zillion topics with no depth. I see new grads who can't do basic things like write a class, object, loop, or function in their main computer language!

Last week, I wrote of a Trilogy Education grad who couldn't do basic JavaScript, OOP, or write a linked list: https://lnkd.in/gcB9-Z7P

Today I worked with a Lambda School grad who didn't know how to write a loop, if statement, or use a dictionary (or hash) in Python.

I want to SHOW you, by solving 150+ LeetCode problems, to do DS&A in depth. I'll start each problem WITHOUT looking at other answers first. I'll time how long it takes me to finish, since speed matters in tech interviews.

In each problem on GitHub, you'll see:

1. My full code answer, sometimes with comments + screen outputs for more depth.

2. Often I do a problem 2-3 times. I may post my rough draft answer, then my final better answer, so you see how I improved it.

3. How long it took me to do it. I may take 1 hour to do it from scratch, then code it again 2 more times for speed, cutting my time to 1.5 minutes. I may post both my original (slow) time + my fast time.

4. My answers' Big O time + space complexity.

5. Which top 3 companies (on LeetCode) ask each question. This often means Google, Facebook, Amazon, Microsoft, etc.

I use the hashtag #raymond_dsa for all my LeetCode + DS&A posts. Follow it. I'll number each post.

Post your LeetCode answers on GitHub + in my comments. Let's all learn, teach each other, + help us get great new software jobs! ❤️

No comments:

Post a Comment