5 ms·
The title is much broader than what's listed in the table of contents, which is primarily what you'd find in one course (algorithms) from a CS undergrad course
by jimmahoney 12y ago
The title is much broader than what's listed in the table of contents, which is primarily what you'd find in one course (algorithms) from a CS undergrad course of study.
For an online text that covers similar stuff, see http://interactivepython.org/runestone/static/pythonds/index.html http://interactivepython.org/runestone/static/pythonds/index... .
The last "interview" chapter is about getting a job, not about CS itself.
A good starting spot for the topics
in "computer science", at least at the
undergrad level, is the ACM curriculum ( http://www.acm.org/education/CS2013-final-report.pdf http://www.acm.org/education/CS2013-final-report.pdf ).
- p1esk 12y agoWhich language is better for studying algorithms: C or Python?
- pm90 12y agoI would suggest C only if you are a reasonably proficient C programmer. Actually, even then, I would suggest using Python. Choosing any language means that you are pigeonholed into using the DS that the language supports and have to think about things from the language's perspective. But just the ease of writing and experimenting with Python code makes it a great language for writing algorithms. e.g. https://github.com/pratikmallya/interview_questions https://github.com/pratikmallya/interview_questions
- p1esk 12y agoBut can't this be viewed as an advantage of C? The lack of suitable data structures would force me to implement them first myself, and then use them to build algorithms. Am I missing your point?
- SpoonMeiser 12y agoPython You don't have to worry about memory management, pointers and the like, and can just focus on the algorithms. All that stuff it super important to also know, but probably easier to learn about them separately.
- p1esk 12y agoI looked at the implementation of a linked list in the Python book above, there it's done with objects instead of pointers. To be honest, the idea of pointers seems to be more straightforward in this case: one node "points" to the next, while the idea of an object seems a little abstract to me. It took me a moment to understand that an object is just a memory location (pointer) to "something", and it's less clear what that "something" is. It probably took me just as long to see the relationships between a pointer and an array or a struct when I was learning C, but I'm afraid at this point, to understand Python data structures I have to mentally translate them to C data structures.
- nstart 12y agoJust to add a third voice. Python. For all the reasons already stated. Personal story. I started programming with C. The day I picked up Python (many years later) I knew that this was the language that any university should have used to get students started with programming/algorithms.
- p1esk 12y agoI work in machine learning. I have to know both Python and C (C++). I feel like whatever language I will choose for learning algorithms, I will end up knowing better. If you could choose, looking back, which language would you prefer to know better: C or Python?
- nstart 12y agoThat's a really tough question. If I had to pick one, I'd take C. Simply for the reason of employment. I can't think of any other reason to pick one over the other. My choice of python as my go to language has bitten me in the sense that I see very few job postings listing python as the required skill. Language isn't really important but as long as the world spins in a particular direction one has got to live with it. On the same note of employment however, C opens up a completely different line of work in robotics and electronics related stuff which is something I really want to get into.
- p1esk 12y agoInteresting. Thanks. In ML field, from the point of view of employment opportunities, I'd say the real "language to know" is CUDA. Which unfortunately still leaves the choice of C vs Python: https://devtalk.nvidia.com/default/topic/540772/preferred-language-for-learning-cuda-language-concepts-/ https://devtalk.nvidia.com/default/topic/540772/preferred-la... I wish there was a book on algorithms that would display both C and Python code side by side!
- vegetor 12y agoc) English
- p1esk 12y agoI'm afraid my computer is not smart enough (yet) to understand English! :-)
- vegetor 12y agoPeople used to test programs on paper ... Your imagination is at least as mighty, albeit often slower than a PC. English is badly defined, I rather thought about logic. The languages don't really matter, all share the same fundamentals. For algorithms, FP seems just as beloved: http://mitpress.mit.edu/sicp http://mitpress.mit.edu/sicp
- p1esk 12y agoSure, but to know the algorithms is not enough. I remember I was asked to implement a certain prime numbers search algorithm in C, and I spent many hours trying to wrap my head around how to do it, even though the algorithm itself was perfectly clear to me. Not only that, I then spent several more hours trying to make it faster, which is also language specific. So the language does matter in my opinion.