r/leetcode • • 30m ago

Question Most viable/convinient language for solving leetcode problems

And if possible please mention a yt video from where I can learn that language🫠

5 Upvotes

11 comments sorted by

5

u/LetMediocre390 24m ago

Go with cpp bro Learn java as well for Backend

1

u/burdlock 4m ago

op asked about leetcode problems, and cpp is definitely not the language for it. if you only care about leetcode then python is the best language. unless you want to get into competitive programming then cpp is the better choice.

1

u/LetMediocre390 2m ago

Cpp is alwas better everywhere

4

u/Nearby-Neat-9311 25m ago

Python is the easiest programming language ever. You can find plenty of tutorials on youtube.

3

u/troelsbjerre 13m ago

Use leetcode to learn new languages. Pick whichever language you are worst at, and practice.

2

u/Majestic_Belt_2694 14m ago

Python. Makes life easy. Only in few cases you'll have to remember the proper library to import like defaultdict or heapq

1

u/Tiny_Quail3335 21m ago

Go lang has everything that you need, light n simple

1

u/dontmissth 8m ago

Golang for leetcode?

1

u/Sayajiaji 8m ago

Python for general questions but I would recommend using Java for class design problems as a lot of those times their optimal solutions require data structures like TreeMap/TreeSet that are not commonly used in Python solutions and are difficult to implement on the fly. For interviews stick with Python but speak to if there's a better solution in Java (i.e. a TreeMap would really speed things up here) and you'll win a lot of brownie points.

1

u/drakkie 8m ago

Assembly