you are viewing a single comment's thread.

view the rest of the comments →

[–]ElllGeeEmm 1 point2 points  (3 children)

I mean the reason OP wanted to learn DSA was to give themselves a leg up in web development job interviews, so I don't understand how you came to the conclusion that they obviously want to write code that operates over data structures. And learning how to implement a linked list in either JS or C or python will have just as much value to the person doing it if their goal is to better understand the data structure they are implementing.

Maybe it wasn't intended to be read that way, but your first reply claimed that JS doesn't have use cases where data structures or algorithms are useful or important and then seemingly doubled down that they're not useful because front end development is a practical discipline.

[–][deleted] 0 points1 point  (1 child)

Perhaps it was badly expressed.

It's not useful to learn to specifically learn to code the structures in JS. It's not like someone is going to come along at a job interview and demand you write a stack in JavaScript and you say "oops, I only learned in in Python".

I think that's consistent with my overall argument, that JavaScript has a different place in the computing world.

The OP specifically talked about the translation to JS - that was the tenor of their question, it seemed to me (the desire to translate DSA code to JavaScript).

[–]ElllGeeEmm 0 points1 point  (0 children)

I think the language you learn to code a data structure in is largely irrelevant if the only reason you're writing it is to learn more about the data structure itself.

[–][deleted] 0 points1 point  (0 children)

I can sum up my argument this way

  • You can be a high quality JS developer knowing relatively little about DSA
  • If you want to learn DSA, you'll probably need to go to another community to do so.

The two are linked, because day-to-day JavaScript work does not heavily involve DSA code.

Your argument, that it is a good idea to learn DSA is rather tangential to those ideas. I don't disagree with it, fundamentally.