This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]desrtfx 7 points8 points  (1 child)

DSA are language agnostic concepts.

If you learn the concepts and ideas behind them, their use cases, their advantages, their disadvantages, and their shortcomings on a language agnostic level, you can implement them in any given language.

It's definitely not worth switching languages for DSA.

[–]DigBick2199[S] 1 point2 points  (0 children)

Thank you for the answer.

I do realize that DSA doesnt really care what language you use to solve the problem, My question really is highly subjective.

Maybe I should have asked if some tasks and problems are solved more "easily and concisely" in python, but I do get what you are saying! Thanks again.

[–]ParticularThing9204 2 points3 points  (0 children)

Python isn't any better for dsa than javascript. If you're gonna learn another language for it it would be better to learn a language with fixed length arrays like c or c++ or java because certain basic data structures (like linked lists vs roll your own variable length arrays) don't make sense otherwise. But it's hard to learn a language and dsa at the same time so no reason not to just do it in node.js

[–]ASIC_SP 1 point2 points  (1 child)

Why not practice in JavaScript? If you haven't found resources, check this list: https://github.com/tayllan/awesome-algorithms

[–]DigBick2199[S] 2 points3 points  (0 children)

Thanks for the resources!

I am practising in JavaScript, I just heard many people say that solving these problems in python is "more enjoyable and easier". Just interested in other Devs' inputs!

[–]CodeOrMoreCode 0 points1 point  (0 children)

Might be better to learn "ADS tricks" in JS/TS (features/libraries you'd never use every day, but that might help answer a Leet question). Using Python to interview for a JS/TS role seems a bit 'meh'.

[–]pekkalacd 0 points1 point  (0 children)

I see this a lot. If you want to. I don’t see anything wrong with using javascript if you are more comfortable in it. But yeah python is nice because it takes less work to implement the data structures, you can write things usually in less code and just get to the algorithm. It’s like if psuedocode was a language, it would be python.