Fog Creek Software
Discussion Board

Data Structure Algorithms

The question I am asking is from the job perspective and not for academic purpose nor I am looking for academic answers.

What type of obvious and not so obivous data structure and algorithm and algorthmic techniques do you use? The meaning of obivous can be different from person to person, but you know what I mean.

Some data structure:
List, Dictionary, Hash, Stack

GCD, Huffman Coding, quick sort.

Algorihmic  Techniques.
Brute Force,

do you  have need to solve the problems like travelling salesman problems?

Also, do you think that more knowledge about more items in your list can solidify your handles to solve your problems?

Finally where do I study the algorithms online self-paced and does anyone see any advantages with that for the programming job  availibility and job performance perspecitves.

Thank you very much.

Wednesday, August 20, 2003

I use the simpler data structures such as stacks, queues and lists pretty frequently on the job.  I rarely have the need for the more esoteric data structures, but that is more due to the products I develop than anything else.

I have a friend who is a C++ programmer for a game company and believe that industry, it's all about data structures and squeezing optimum performance out of them.

Although I only use a small subset of data structures, I'm glad I'm aware of the others for the simple reason that I have that tool in my toolkit. I couldn't tell you the best way to implement a weight-balanced binary tree, but I at least know what it is and if I see a situation where it might be useful, it's off to Google I go.

Mark Hoffman
Wednesday, August 20, 2003

Data structures I use every day:
Stacks, lists, queues, multidimensional arrays, hashtables, trees (usually *not* binary).

Data structures I use less frequently:
Graphs, heaps, circularly linked lists

I rarely need to actually *implement* the kind of algorithms that you're talking about, but it certainly helps to *understand* things like that.

"Algorithmic techniques" is so vague that I'm not clear what you're looking at. Still, I'd suggest learning two things. One is how algorithmic complexity works, so you know enough to choose an O(nlogn) sort algorithm, for example, rather than an O(n^2) one. The second is to avoid premature performance optimization. (There are likely exceptions to this for certain performance-critical fields like game programming or high-volume transactional servers, but those aren't where I live.)

John C.
Wednesday, August 20, 2003

I always thought "algorithm" and "data structure" were two different perspectives of the same thing.

Joe AA
Wednesday, August 20, 2003

I wouldn't argue  theoritically for example if algorithm and data structure are different or same thing..

Few more example of algorithm technique:
Divide and Conquer
Exhaustive Search
Prune and Search

Also what algorithm terms you use?
for example,
node  etc..

Also my emphasis on different types rather than evaluation at this point.


Wednesday, August 20, 2003

I try to get myself out of holes where I end up doing more programming work than necessary. And if I find myself hoping I could write the next main memory database on crack just so I can use it inhouse I know I am overextending myself. So I tend to spend a lot of time actually trying to avoid disasters by ensuring the framework of the software I write will run just fine (as in fast, easy to edit, easy to upgrade) in the simpliest form. Now this is for small custom work. Big software is big, and it's very easy to make architectual mistakes whre you end up with a pig of a software.

Li-fan Chen
Wednesday, August 20, 2003

"Data structures I use every day: Stacks, lists, queues, multidimensional arrays, hashtables, trees (usually *not* binary).

Data structures I use less frequently: Graphs, heaps, circularly linked lists"

That's about right for me. Although I'm curious why you distinguish graphs from trees (since a tree is a graph). It seems to me that people who use OO languages generally use graphs a lot, even if they aren't explicitly thinking about it (objects refer to other objects, which refer to other objects...).

Brad Wilson (
Wednesday, August 20, 2003

Yes you do make a graph when you link objects, but how often do you use graph algorithms on them (traversal, shortest path, path finding, etc)?  Not that often, I would guess.  Many graph algorithms also need edge weights as well, which you don't have in this case.

You could say you're using graphs when you write any C program with multiple files, because the #include structure forms a graph, but that's not really accurate.

Thursday, August 21, 2003

I want to build up a binary tree with huge level and travel it from any node I designated up to the

Is there a proper way that I can locate to this arbitrary node and work out this special traversal?

Could anybody help me to descript out the structure of node I desired.

Thanks in advance.

Aaron Lee
Tuesday, March 9, 2004

I'm having little bit problem with sorting algorithm (bubble sort). Most of the times(99%) my data comes in a sorted order except smallest number is in last position.
ex : 10, 23, 35, 49, 50, 78, 5

I'm sure bubble sort is least efficient for this type array especially when the array size is large. Can anyone suggest any alternate efficient algorithm in my case.


Wednesday, May 19, 2004

*  Recent Topics

*  Fog Creek Home