search
HomeWeb Front-endJS Tutorialdays of Javascript no LeetCode

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!

Statement
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
Replace String Characters in JavaScriptReplace String Characters in JavaScriptMar 11, 2025 am 12:07 AM

Detailed explanation of JavaScript string replacement method and FAQ This article will explore two ways to replace string characters in JavaScript: internal JavaScript code and internal HTML for web pages. Replace string inside JavaScript code The most direct way is to use the replace() method: str = str.replace("find","replace"); This method replaces only the first match. To replace all matches, use a regular expression and add the global flag g: str = str.replace(/fi

Custom Google Search API Setup TutorialCustom Google Search API Setup TutorialMar 04, 2025 am 01:06 AM

This tutorial shows you how to integrate a custom Google Search API into your blog or website, offering a more refined search experience than standard WordPress theme search functions. It's surprisingly easy! You'll be able to restrict searches to y

Build Your Own AJAX Web ApplicationsBuild Your Own AJAX Web ApplicationsMar 09, 2025 am 12:11 AM

So here you are, ready to learn all about this thing called AJAX. But, what exactly is it? The term AJAX refers to a loose grouping of technologies that are used to create dynamic, interactive web content. The term AJAX, originally coined by Jesse J

Example Colors JSON FileExample Colors JSON FileMar 03, 2025 am 12:35 AM

This article series was rewritten in mid 2017 with up-to-date information and fresh examples. In this JSON example, we will look at how we can store simple values in a file using JSON format. Using the key-value pair notation, we can store any kind

10 jQuery Syntax Highlighters10 jQuery Syntax HighlightersMar 02, 2025 am 12:32 AM

Enhance Your Code Presentation: 10 Syntax Highlighters for Developers Sharing code snippets on your website or blog is a common practice for developers. Choosing the right syntax highlighter can significantly improve readability and visual appeal. T

8 Stunning jQuery Page Layout Plugins8 Stunning jQuery Page Layout PluginsMar 06, 2025 am 12:48 AM

Leverage jQuery for Effortless Web Page Layouts: 8 Essential Plugins jQuery simplifies web page layout significantly. This article highlights eight powerful jQuery plugins that streamline the process, particularly useful for manual website creation

10  JavaScript & jQuery MVC Tutorials10 JavaScript & jQuery MVC TutorialsMar 02, 2025 am 01:16 AM

This article presents a curated selection of over 10 tutorials on JavaScript and jQuery Model-View-Controller (MVC) frameworks, perfect for boosting your web development skills in the new year. These tutorials cover a range of topics, from foundatio

What is 'this' in JavaScript?What is 'this' in JavaScript?Mar 04, 2025 am 01:15 AM

Core points This in JavaScript usually refers to an object that "owns" the method, but it depends on how the function is called. When there is no current object, this refers to the global object. In a web browser, it is represented by window. When calling a function, this maintains the global object; but when calling an object constructor or any of its methods, this refers to an instance of the object. You can change the context of this using methods such as call(), apply(), and bind(). These methods call the function using the given this value and parameters. JavaScript is an excellent programming language. A few years ago, this sentence was

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment