Ask HN: Do you need to know Algorithms and Data Structures in your daily job? - pauloortins
======
graycat
For the special algorithms and data structures in the college texts, do I need
to know that material in my "daily job" writing software? A little!

So far mostly the material from those books has been available to me in the
code written by others, some of the famous open source code and in Microsoft's
.NET.

There is a case where I exploited the heap data structure (that is, as in heap
sort) to create an efficient _priority queue_ , and I didn't find code for
that ready to use by others.

There is a case where I might take k-D trees (finite dimensional trees for
essentially a multi-dimensional version of binary search) and modify it to get
an algorithm I might need, but so far I haven't.

Generally we have to expect that what was in D. Knuth's TACP in the 1960s and
commonly useful now has been put into libraries for use by others.

This is a common situation: For the simplex algorithm for optimization, rarely
would it be advisable to try to code up a version yourself. Instead get a copy
of C-PLEX, the IBM OSL (Optimization Subroutine Library) or some other
respected code. Then knowing how simplex works would be helpful, but not
because want to code the algorithm from scratch yourself.

The core of my work is some new work in algorithms, but those algorithms would
not be good candidates for a library for general use. So, yes, I work with
_algorithms_ occasionally but mostly don't code the ones in the college texts.

------
solidparallel
It really depends on what you mean by algorithms/data structures. If you mean
knowing how to implement "these specific algorithms" in "this much time",
probably not. Will you need to know the exact time complexity of methods for
every data structure? I would hope not.

However, is it useful to know that such and such data structure is more
efficient than that other structure over there for what I want to do with it?
Yes. Is it important to be able to think in terms of other algorithms you've
learned that might make what you're working on easier and more efficient?
Absolutely.

I have never once implemented any of the algorithms or data structures that we
learned about in my intro to algorithms/data structures class, other than for
the class itself. But learning how those algorithms and data structures work,
even if I can't remember the specifics of all of them at the top of my head,
has has helped me to be a much more efficient programmer because they gave me
the tools to think as such.

So, do you need to know specifics about exactly how every algorithm or data
structure works, probably not unless that specifically is your job. But is it
useful to have a basic understanding? Absolutely.

------
Nihilartikel
Years ago I was doing summer temp work at an office. Myself and a small group
of other temps/interns were given several tall stacks of records to
alphabetize by title. I shudder to think how long that would have taken if I
hadn't convinced everyone to do a meat-space parallel merge sort.

------
codegeek
If you daily job involves programming or writing code, then yes. Absolutely.
What really is a data structure ? Wikipedia [1] defines it as "a data
structure is a particular way of storing and organizing data in a computer so
that it can be used efficiently".

Storing and organizing data. There you go. If you write code, you are _always_
storing/organizing/manipulating data aren't you. whether it is front end, back
end whatever. Everything is data end of the day.

Now I am of course not saying that you must know linked list or stacks or
queques etc. But you must know data structures in general because that is a
core foundation. [1]
[http://en.wikipedia.org/wiki/Data_structure](http://en.wikipedia.org/wiki/Data_structure)

------
dalke
Do like strings, lists, dictionaries, stacks, trees, and priority queues count
as data structures? In that case, all the time.

------
pizza
I think they're more the type of thing people seek when naive, very readable
solutions don't work, so maybe weekly. But when you find the right algorithm
for what was previously a tough challenge, it's fun!

------
tait
I'm not even working full time as a programmer, and I find them somewhat
useful in thinking about other kinds of problems.

------
BenjaminRH
Absolutely.

