What Programming Language Should I Learn for LeetCode Problems?

0
0
Asked By CuriousCoder123 On

I'm looking to branch out from Perl and want to learn a new programming language to tackle LeetCode challenges. I've predominantly used Perl along with some experience in C/C++, Java, and Mathematica, but my GUI experience is limited to a Notepad clone I made in Java long ago. I primarily write simple scripts for personal use and have no intention of coding for a living.

I'm considering this switch for a few reasons: first, I'd like to create simple GUIs that I can style. Second, installing Perl modules has become cumbersome, and I'd prefer a quicker setup. Lastly, I need a language that works with LeetCode since Perl isn't an option, and I'm not confident in my ability to implement data structures in C from scratch.

I've ruled out Python due to its syntax giving me a hard time, and Lisp because I find it unintuitive. Java feels outdated, and I've also dismissed PHP for being web-centric. LeetCode offers several other languages like JavaScript, TypeScript, Kotlin, and Rust, but I'm unfamiliar with most of them. Ultimately, I'd love to hear if my assumptions are off or if anyone can recommend a language to learn.

3 Answers

Answered By CodeGuru2020 On

I'd recommend diving into JS or TS on https://www.executeprogram.com/. But before you hit LeetCode, taking an algorithms class can really help make things clearer and easier. As for Python, so many people swear by it for LeetCode because it’s straightforward and cleaner than Perl. You'll likely read through other people's code much more easily too!

Answered By CodeExplorer99 On

TypeScript or JavaScript could be your best bets for creating GUIs easily. Keep in mind, every programming language brings its pros and cons. There will always be something frustrating about a language, so it's about finding one that works for you. If you end up hating them all, you could always try making your own language - it's a tough path, but some find it rewarding!

PerlNinja88 -

Interesting! I've never really heard of TypeScript. Is it just a variation of JavaScript? And can I write scripts with it like I do with Perl or Python, or is it mostly limited to web applications?

ConfusedCoder42 -

Also, why do we even have so many programming languages? Isn’t there overlap between them? I remember learning about object-oriented vs functional, but can’t they all do similar tasks, just in different ways?

Answered By TechSavvyGuru On

Honestly, I think you should consider learning Python or JavaScript. They're super popular and have a ton of resources available, which will be useful for your LeetCode journey. Personal opinion, Python feels a lot like Perl in some ways, and it's definitely the easiest of the two to pick up.

PerlNinja88 -

Thanks for the input! I have this sneaking suspicion that Python might be the way to go, even if it's not what I want to hear. But what about JavaScript? Is that just for web stuff now, or can I use it for standalone applications?

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.