These days, I'm investing heavily in data structures and algorithms and trying to solve some programming puzzles.
I'm trying to code and solve with Java and Clojure.

Am I wasting my time? should I invest more in technologies and frameworks that I already know in order to gain deeper knowledge (the ins and the outs) and be able to code with them more quickly?

By studying data structures and algorithms, am I going to become a better programmer or those subjects are only important during college years?

closed as off-topic by Ixrec, user40980, durron597, gnat, GlenH7 May 16 '15 at 11:26


  • "Questions seeking career or education advice are off topic here. They are only meaningful to the asker and do not generate lasting value for the broader community. Furthermore, in most cases, any answer is going to be a subjective opinion that may not take into account all the nuances of a (your) particular circumstance." – Ixrec, Community, durron597, gnat, GlenH7

  • 5
    What data structures and algorithms are you working with? What programming puzzles are you using them on? – oosterwal Feb 23 '11 at 1:04
  • I'm working/yet to work on Hash-tables, Maps, Heaps, Graphs, Trees and the accompanying algorithms (traversing, hashing, searching, inserting, deleting, and some sort algorithms). The puzzles are from TopCoder and Google Code Jam competitions. – Chiron Feb 23 '11 at 1:09

It is entirely possible to spend most/all of your career doing significant, useful work, with only minimal knowledge of algorithms and data-structures.

The minimum level of knowledge for algorithms and datastructures, in order to be successful, will require you to:

  • be aware of most of them (including reading up on new ones occasionally as they come out)
  • know where to find good, tested, working implementations
  • be able to compare algorithms and their usefulness
  • be able to correctly copy one from an open-source example to your specific environment, with a small bit of tweaking

There is no *maximum*. If you want to, you can take your study to the PhD level and beyond. It's usefulness is directly related to the kind of jobs that you're interested in having, and to which kind of work you find most interesting and rewarding.

That said, as a rough (but not absolute) guideline, the more low-level, more resource intensive and less automated the language, framework, and application that you're working on will be, the higher the required skill level when it comes to algorithms, and data-structures. For example, implementing Ukkonen's algorithm in assembly will likely, but not necessarily, mean you'll want a masters' level understanding of the algorithm and data-structures involved.

In your specific situation, going from a Java development background to working on the iOs, all other things being equal, expect a slightly higher demand on your general understanding of algorithms and data-structures. You'll want to be able to run efficiently on a device with fewer available resources. Also, expect to add a couple of new categories to your arsenal - most notably, you'll want to know more about memory management.

  • 2
    Strongly agree. I almost never have to deal with algorithms directly as the vast majority of those needed are already included in basic libraries. But I would be in trouble if I didn't understand performance characteristics enough to choose the appropriate algorithm or structure for a particular use case. OP, unless you want to work in algorithms, you can get much, much, much better return on investment for time spent learning other libraries and tools and techniques. – quentin-starin Feb 23 '11 at 2:06
  • 1
    Ugh, writing Ukkonen's algorithm in Python is hard enough, I can even begin to imagine doing it in assembly. – rjzii Feb 23 '11 at 2:49
  • 2
    This falls within the "compare algorithms" point, but I just wanted to elaborate that you should know the tradeoff between space and time complexity. Many algorithms that are commonly used on desktops due to their speed may not be feasible on iOS because they require large data structures. – Karl Bielefeldt Feb 23 '11 at 5:38
  • 3
    I disagree. Simple reason is when someone spends time learning Algorithms or Designing or Architecture it is not just about when/where he is going to use it. It just makes the person smarter and he might use the learning while solving other problems. It also encourages a sense of doing things optimally. For eg. there might not be a hand made Algorithm for everything but since you know a lot of stuff you might come with something exceptional on your own. – Geek Feb 23 '11 at 8:40

Nah. If you're just starting out then trying to get into big picture stuff like UI programming and such just holds you back. Eventually you do need to go there, and learn larger frameworks...how to use the data structures and algorithms that OTHER people have written. When you're just starting out though it's good to stick to limited scope issues.

Algorithms and data structures are basically the foundation of everything even though you'll probably never write one of your own once you're past beginner stage. Knowing them, or at least having known them, will make you a better developer in the end. You'll know when and why to use each one because you'll know HOW they work. Plus, making your algorithms and data structures generic so they can work with any type or type with interface X really IS something you'll be using for the rest of your career.

I see too many people hopping into things like Qt who end up asking questions that show zero knowledge of C++ (for example). They're trying to skip too many steps and in the end it takes them longer to learn. I'd say you're on the right path.

  • I have been doing Java programming professionally (being employed I mean) since 2007. Now I'm going (at least I hope) to do some iOS development. – Chiron Feb 23 '11 at 1:17

You're not wasting your time.

If, in the course of your job, you need to use a tool or framework that you haven't used previously, you'll learn it and use it.

However, if you need to use a data structure or algorithm that you haven't used previously, chances are you won't even know it exists, and you'll solve your problem using some horribly sub-optimal technique that takes a bunch more effort and scales terribly.

What I'm trying to say is, this is the sort of stuff that you won't just learn by doing, you need to learn it by learning, either in an academic situation, or through personal investment of effort, as you're doing now.


In practice, be aware of what are the available data structures, what are their complexity characteristics, where to get good implementations of them, and where you keep your copy of Introduction to Algorithms to look up the details later.


If that's what makes you happy, then you should definitely stick with it. If you're worried you aren't applying enough theory, consider a theory-heavy project. Build a small programming language, like Potion, from scratch. A full implementation will use Hash tables, Graphs, Trees, and a huge array of algorithms. If it seems interesting, you can dive deeper into optimization, native code generation, or user extensibility.

You'll become a better programmer when you stay interested and focused, not when you work on projects that seem practical but a little dull.

Down the rabbit hole, Dorothy!


I spent a lot of time hacking around in C/C++ with OpenGL. I know the languages and API well enough...and I've become a reasonable developer and programmer because of that experience. That said, the actual algorithmic knowledge required to solve various problems encountered I've only just really been able to grasp.

Speaking from personal experience, focusing on building applications is going to be a waste of your time if you don't know the theory behind the problem domains which pertain to what you're trying to build.

For many different kinds of software, these domains will stem from the fundamentals you learn from studying algorithms, in addition to their own specific niche-based theory (e.g., linear algebra in computer graphics, number/information theory in cryptography, etc.).

You don't necessarily have to become a computational wiz-kid behind everything, but doing what you were doing at the time of this post is a very, very necessary path to go down at least once in one's programming journey - regardless of whether or not they're self-taught.


I guess if you don't know them well then you won't find reasons to use them. I seem to find uses for them all the time. But I have to admit that with the improvements in generics in the last half dozen years or so the need to roll your own occurs less and less frequently. That still doesn't remove the benefits of knowing how and when to use them and they can greatly simplify otherwise complicated code.
