Home > Web Front-end > JS Tutorial > days of Javascript no LeetCode

days of Javascript no LeetCode

Linda Hamilton
Release: 2025-01-19 10:29:09
Original
388 people have browsed it

In the previous text, I started using the Hacker Rank website to practice algorithms and I mentioned it to my boyfriend. He suggested trying LeetCode because I wouldn't need to use Node.js and could just focus on the algorithm challenge. I'm already on the second day using LeetCode.

Reinforcement: these texts within series, like this one and the one from System Design, are me swapping twitter/x and bluesky for dev.to. That said, I'm going to say it in a light-hearted, "bar table" way. Please take this into consideration hahaha

...

I confess that I always had the impression that LeetCode was for very intelligent people and that it definitely wasn't for me, the "ignorant brucutu" thought that most of us, devs, have with the things we choose not to know and just judge hahaha

I say this because it was a judgment I made based on what I saw from my colleagues on Twitter, so much so that I never saw any female colleague talking about LeetCode - and we know that "sometimes" men like to do the equivalent to "who has the biggest shit" using salaries, hobbies like coffee, the company he works for and even some "intellectual demonstrations" such as super complex algorithm challenges.

I know that practicing algorithm challenges helps in job interviews, but, as a developer working in Brazil, I've never needed to take an algorithm test and discuss the complexity, etc. - I've never tested for companies that require these things and I confess that I got angry because of my social network colleagues wearing a monocle and twirling the tip of their mustache every time they talked about where they worked and about algorithm testing hahaha

But hey, if you also created these trials, I'm here to tell you that solving algorithm challenges is super cool, it's not something for semi-gods and it won't turn you into a monocle person - unless you already have a tendency the "sh*t measurement", but then it's not the platform's fault.

What is LeetCode like?

Yes, there are super difficult challenges. But that's not the entire platform. In fact, even if you are new to Javascript (you already need to know how to program, otherwise you won't be able to make the most of it and you will get frustrated), LeetCode is for you.

Or, if you are already a full-time or senior dev but don't have the time or interest in spending hours and hours on things you don't even use at work, know that in 10 minutes you can solve a challenge in LeetCode and you will learn cool stuff.

My suggestion is to start with "30 days of Javascript" on the platform. The only point is that you need to know English or at least translate what you don't understand (I think there is a direct translation of the page in the browser too, but I haven't tested it). But apart from this point about the language, the challenges of this study plan are quite possible to be completed in a few minutes.

Tela inicial do plano de estudos de 30 dias de javascript
The face of the study plan and the two exercises I have already solved

Even if you are already full or senior, but are not used to algorithm challenges, I also suggest that you start with this study plan. Yes, you will find things easy but you will see that you have the opportunity to learn mainly to think about the structure of how to solve a problem and to get used to having 3 or 4 ways of solving the same problem - and knowing the reason for each choice .

O painel de desafio do LeetCode

The challenge is described in the "description" tab and it's interesting to read everything (I went with "ah, it's easy" I didn't read everything and I did it wrong the first time haha ​​Ah, the market creates a lot of bad habits in us) so as not to do neither more nor less than what was actually requested.

But my favorite part is the "editorial" tab, which is the most valuable thing in LeetCode, in my opinion:

Aba de editorial, com explicações sobre o exercicio

Here, you will not only understand the purpose of the test but learn about the concept itself and wow, talking about closures in Javascript makes me emotional. And I liked it even more that this part brought 4 possible ways to solve the challenge, in order of performance and simplicity, in addition to bringing super interesting content by comparing classes in Javascript (which are not real classes, like in Java, because the constructor is a function) with Closures.

A small parenthesis to talk about closures

Closure is a very powerful and interesting feature, however, it is rarely used because people always say that it is "not necessary", that it is "dangerous", that it is "not performant" but in fact it is because we end up seeing a lot of market projects using strictly object-oriented JavaScript, which "doesn't complicate".

I have no objection to using an object-oriented paradigm with JavaScript, the language even supports this behavior, thousands of companies use it this way and it is practical because it is more familiar to those who come from Java or C#. However, know that there is a lot of interesting behavior in JavaScript that we fail to take advantage of because we end up using it as Java with a simpler syntax - and then comes the complaints about comparing completely different things.

But I'll talk about this in a serious article that I'll publish next week, "Idiomatic Javascript". Back to the topic:

Runtime Meter

o medidor de runtime do leetcode

After submitting your test (and it's really cool that there are test cases to ensure that you are meeting the requested scenario) you will see how performant your solution was and how many other people also developed solutions in the approximate time of execution that yours took to be executed. This is really cool because you can look at the other quickest solutions and expand your repertoire of different ways of solving the same problem.

Concluding...

To repeat: LeetCode is not for geniuses, it is for anyone who works with programming and wants to learn more. It's a cool platform to study even if you don't have ambitions to sign up for selection processes that use LeetCode challenges, and it works well whether you're a junior or a tired and busy senior who doesn't have time for anything. Yes, you have 10 minutes haha ​​Even if it’s just to get to know it and see that it’s not something out of your reality.

I'm not gaining absolutely anything to recommend this here and I don't even want to, I'm saying it because it was something that I really found advantageous. So, give it a try and get to know 30 days of Javascript!

The above is the detailed content of days of Javascript no LeetCode. For more information, please follow other related articles on the PHP Chinese website!

source:dev.to
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template