To give you some backstory on why I am asking this question, I recently got my first dev job as a Front End Developer after graduating from a coding bootcamp this summer, studying MEAN stack. Although, this position is part-time and contract, I'm still job searching for a full-time role, as it's impossible to live in Seattle on part-time income. I'd like my next position to be full-stack and I know I need to strengthen my knowledge of data structures and algorithms (DS&A) to succeed during interviews. The only language I know is JavaScript.
Through my observations, it seems that many people do not code DS&A in JS. While I know people do, as I'm one of them, many resources on DS&A are in Java, C#, Python, or other languages.
Do you think there is a language that is better suited for solving DS&A? Maybe based on native methods or other reasons?
Also if you have any resources you'd like to share, other than Code Wars, HackerRank, LeetCode, Code Fights, I'd love to know!
Oldest comments (21)
Yeah, it seems like JS is more oriented around practical industry solutions. I would guess that Python is your best bet in terms of being approachable as well as rich in resources that cater to computer science topics.
Technically I think Java and C++ would have the most relevant teachings, but if you're coming from JS, there could be a pretty steep learning curve if you mostly want to focus on the concepts.
I'd love other opinions, though.
As for resources, my head immediately goes towards @vaidehijoshi's posts. They are quite awesome looks at core DS&A CS concepts, with the most introductory stuff earlier on in the series. She does use JS in her examples, for what it's worth.
I'll second Ben's suggestion about Vaidehi's posts - they are great.
Data structures are one of those things that you can get away without knowing for some things, but learning them can keep you from spending a lot of time building something that won't scale. There are some data sets online that you can download and play wi... er, do "research coding" on. Way back in my COBOL (yes, I'm old) newsgroup days, someone posted a link to the text of the KJV Bible, and we all tried different ways to calculate the count of unique words, the frequency of words within the text, the frequence of words by what vowels they contained, etc. It sounds silly, but we all learned lots of different ways to accomplish a problem. For me, it helped concepts click.
When people talk about Python or R (what I'm currently learning for my day job) being good for this sort of thing, they are talking about the ease with which you can do some analysis on the data once you have it. They also have some tools to help clean up the data, if you don't have a nice clean source. (I mean, I made a pie chart today by typing
t = table(friends$Friends); pie(t)- crazy!) This is different from what you're wanting to learn at this point. For learning those, whatever language you know is a good one. :)I'll wrap this long-winded reply with some encouragement. Don't get discouraged if you don't pick up data structure concepts the first time you read them. It was the single toughest class of my entire Bachelor's program; I was grateful to get out with a B-. (Don't be discouraged by my description of it either!)
Best of luck in your educational endeavors!
Forgot to metion - codeeval.com has some challenges you can take; a lot of them are "parse the data and get the result" type exercises.
Don't have much to offer about DS&A concepts, besides also recommending Vaidehi.
I've heard interviewing.io is pretty good for practicing questions. Love their blog posts by Aline Lerner, which take a deep dive into the data.
I do recommend use python to learn DS&A. Why? It's a simple language that will allow you to focus less in the language itself and more in the problem that you're trying to solve.
Many colleges start using python to teach DS&A in the last years.
And one great resource to you learn python is learnpythonthehardway.org. It's paid, but if you want to learn python, this is an awesome book (and videos too).
Python. The syntax is simple, the language is easy to use and get into, the community is huge, and you can build python versions of any data structure you like.
I would say Go, it's way simpler than Python and 10-100x times faster (because it's compiled). Also it makes a very good pair with NodeJS, in my opinion are complementary (write business logic in JS to share code with the client) and move to Go the heavy operations.
Devs make DS&A in JavaScript, but they usually are already built, like in any language, so you do not need too. You wouldn't want to rewrite the MapReduce Mongo algorithm, only if you want to learn how is done.
Hi, judging from your description, I think you talk about two separate issues.
1) Learning the basics of computer science. That is, understanding what big O notation is, how data structures work (sets, lists, hashmaps, heaps, trees), and how some simple algorithms for sorting and searching work.
2) Learning a new programming language.
I think you should tackle these issues individually (in part, because at university, they are thought in different courses). For 1) I would recommend you read a book such as "Cormen - Introduction to Algorithms" and getting used to reading pseudocode. If you are not satisfied with pseudocode and want to see how some algorithms look implemented in a programming language, look at Rosetta Code.
For 2) you can use any online resource. You already mentioned some great ones. You can look at Codecademy too, which I found really helpful.
I'd say Java, its API is simply amazing regarding abstract data types
By coincidence, @mushketyk just posted this. Great timing.
Python Data Structures Idioms
Ivan Mushketyk ・ Sep 29 '17 ・ 9 min read
Thanks Ben for your reply and for sharing some resources!
Any time!