Questions regarding efficient storing and representing data within a software application.
67
votes
24answers
17k views
Why are data structures so important in interviews?
I am a newbie into the corporate world recently graduated in computers. I am a java/groovy developer. I am a quick learner and I can learn new frameworks, APIs or even programming languages within ...
44
votes
8answers
4k views
How to represent a Rubik's Cube in a data structure
If I am attempting to simulate a Rubik's Cube, how would you create a data structure to store the cube's state in memory, with X number of tiles per side?
Things to consider:
the cube can be of any ...
38
votes
11answers
15k views
How do I learn algorithms and data structures? [closed]
This is in continuation to my previous question where I asked is it necessary to learn algorithms and data structures. I feel yes it is.
Now I work in an environment where I won't ever get the chance ...
35
votes
8answers
2k views
How should I build the data structure for a dynamic, unlimited-size “maze”?
I'm not actually sure that "maze" is the correct term. Basically users start in a single Room that has 4 doors (N, S, E, and W). They can go in any direction, and each subsequent room is contains ...
28
votes
7answers
2k views
When to use DAG (Directed Acyclic Graph) in programming?
I recently found a framework named ecto.
In this framework, a basic component named "plasm", which is the ecto Directed Acyclic Graph.In ecto, plasm can be operated by ecto scheduler.
I am ...
27
votes
4answers
2k views
Which algorithms/data structures should I “recognize” and know by name? [closed]
I'd like to consider myself a fairly experienced programmer. I've been programming for over 5 years now. My weak point though is terminology. I'm self-taught, so while I know how to program, I don't ...
21
votes
12answers
4k views
Do I need to understand algorithms and data structures to be called a programmer? [closed]
It has been six years since I have been coding. Coding into all kinds of things like ActionScript, JavaScript, Java, PHP, Ajax, XML HTML, ASP, etc. I have used arrays, maps, linked lists, sets, etc ...
20
votes
3answers
712 views
How do I express subtle relationships in my data?
"A" is related to "B" and "C". How do I show that "B" and "C" might, by this context, be related as well?
Example:
Here are a few headlines about a recent Broadway play:
David Mamet's Glengarry ...
19
votes
4answers
2k views
Which algorithms and data structures should a developer absolutely know?
I want to be a successful enterprise Java developer. With what algorithms and data structures should I be well versed? What books would you recommend to me?
To be a successful Java developer, do I ...
17
votes
8answers
2k views
Is having trouble with data structures common for beginners?
I'm taking my second course on Java. We are getting into data structures. I have done an assignment on a linked list, and now a stack. I had a hard time with the linked list. The stack gave me a ...
17
votes
6answers
2k views
Should I keep investing into data structures and algorithms?
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 ...
17
votes
4answers
654 views
What is the definition of “Big Data”?
Is there one?
All the definitions I can find describe the size, complexity / variety or velocity of the data.
Wikipedia's definition is the only one I've found with an actual number
Big data ...
16
votes
6answers
1k views
Is it a good practice to use smaller data types for variables to save memory?
When I learned the C++ language for the first time I learned that besides int, float etc, smaller or bigger versions of these data types existed within the language. For example I could call a ...
16
votes
2answers
515 views
What is an Aguri tree?
Going through some old Hacker News items, I came across a post from a user that said
Aguri trees, which marry a bounded-size radix trie (like you'd use in a software routing table) to an LRU list, ...
15
votes
6answers
730 views
How did we get saddled with the (hierarchical) filesystem as the basic data structure?
I'm self-taught and I don't have a CS degree. The more I've been learning about data structure, the more I wonder, in this day and age, how are we still saddled with the filesystem, with directories ...
13
votes
4answers
965 views
What did Bill Gosper mean by saying a data structure is just a stupid programming language?
There's a quotation by Ralph William Gosper, Jr that says:
A data structure is just a stupid programming language.
What did he mean by this? Alas, all I can find in Google about it is ...
13
votes
2answers
384 views
What is the canonical reference on probabilistic data structures?
I've heard of probabilistic data structures like Skip Lists and Bloom Filters being immensely useful and I'd like to learn more about them in general. Is there a canonical reference on the subject on ...
12
votes
5answers
299 views
Storing in-text metadata in a discrete data structure
I am developing an application which will need to store inline, intext metadata. What I mean by that is the following: let's say we have a long text, and we want to store some metadata connected with ...
11
votes
4answers
2k views
Difference between hash and dictionary
What is the difference between Hash and Dictionary. Coming from a scripting background, I feel that they are similar , but wanted to find out the exact differences, Googling did not help me much.
11
votes
11answers
2k views
What is the most complicated data structure you have used in a practical situation? [closed]
The germ for this question came up from a discussion I was having with couple of fellow developers from the industry.
Turns out that in a lot of places project managers are wary about complex data ...
11
votes
2answers
1k views
Pseudocode for Brodal queue
I'm trying to find more resources regarding Brodal heap. All I found is a haskell implementation of Brodal-Okasaki heap, but I think that they are skew heaps, is this correct? Furthermore, I'm ...
10
votes
7answers
2k views
How important is studying algorithms and theory is to becoming a great programmer? [duplicate]
Possible Duplicate:
Should I keep investing into data structures and algorithms?
I'm a CS student. I want to become a really great programmer, what do I need to do to be come a great ...
10
votes
2answers
924 views
When programmers talk about “data structures”, what are they referring to?
When programmers talk about "data structures", are they only talking about abstract data types like lists, trees, hashes, graphs, etc.?
Or does that term include any structure that holds data, such ...
10
votes
9answers
1k views
Card deck and sparse matrix interview questions
I just had a technical phone screen w/ a start-up. Here's the technical questions I was asked ... and my answers. What do think of these answers? Feel free to post better answers :-)
Question 1: ...
10
votes
4answers
385 views
Why is it that MS Data Access story is so fractured ? Is it the nature of Data Access or is just MS?
This StackOverflow question asks "where can I get Microsoft.Data.Objects"
It turns out the answer was probably that its in the CTP4 (code first) release of Entity Framework 4
However there where a ...
10
votes
5answers
582 views
Is there a specific purpose for heterogeneous lists?
Coming from a C# and Java background, I'm used to my lists being homogeneous, and that makes sense to me. When I started picking up Lisp, I noticed that the lists can be heterogeneous. When I started ...
9
votes
7answers
777 views
What are the features required for Object Orientation?
I am just wondering, what exactly are the features a language or a library must provide in order for it to be defined as 'Object Oriented'. Is Object Orientation something that can, more or less, be ...
9
votes
2answers
355 views
What's the difference in content between Chris Okasaki's 1996 thesis and 1999 book, Purely Functional Data Structures?
I want to read Purely Functional Data Structures. I've easily found the thesis (which is freely available as a PDF), but see that there's a book available also. So I'd like to know what the ...
9
votes
2answers
554 views
What is the most space efficient way to implement a graph data structure?
I typically implement graphs as doubly linked lists but this is fairly space inefficient in my experience as I need k pointers/references for k neighbors so for an undirected graph I'd have ~2k ...
9
votes
4answers
1k views
Are trees organised by a “firstchild, nextsibling” structure? If not, why not?
Usually, tree data structures are organised in a way that each node contains pointers to all its children.
+-----------------------------------------+
| root ...
8
votes
4answers
1k views
Analyzing Memory Usage: Java vs C++ Negligible?
How does the memory usage of an integer object written in Java compare\contrast with the memory usage of a integer object written in C++? Is the difference negligible? No difference? A big difference? ...
8
votes
3answers
10k views
Dictionary vs List
So I ran into a Dictionary<int, int> today at work. This just seemed weird to me because I would have probably just used a List<int> instead. Is there a difference and would there be a use ...
8
votes
8answers
3k views
Practical way to store a “reasonably large” amount of data that hardly ever changes?
Think in terms of pre-computed lookup tables or something. At what point does it make more sense to use a database instead of hardcoding values in my application? The values are not going to change, ...
8
votes
4answers
291 views
Origin of structures and classes
What design and implementation issues did programmers have to solve when they decided first to use structures and classes?
When did this happened and who were the pioneers behind these ideas?
Note, ...
8
votes
3answers
1k views
AVL Trees and the REAL world
in school we are taught how we can balance an AVL tree upon an insertion or deleting.
How is this type of knowledge actually going to be useful in the real world?
Can someone give an example on when ...
8
votes
5answers
906 views
Data structures in functional programming
I'm currently playing with LISP (particularly Scheme and Clojure) and I'm wondering how typical data structures are dealt with in functional programming languages.
For example, let's say I would like ...
8
votes
1answer
501 views
Ideal data structure for storing map data?
I was asked this in an interview test. I did okay on the test but didn't know enough to answer this question. I am curious to know what data structures I can use to query the data quickly.
Basically ...
8
votes
5answers
801 views
What data structure should I use for this caching strategy?
I am working on a .NET 4.0 application, that performs a rather expensive calculation on two doubles returning a double. This calculation is performed for each one of several thousand items. These ...
8
votes
1answer
256 views
Is there any better approach to shortest path finding within a (vehicular) traffic network?
Dear fellow programmers,
We're developing software which simulates vehicular traffic.
Part of the process called "assignment" is concerned with assigning vehicles to their routes and has to use some ...
8
votes
2answers
723 views
What is this domain of study?
Suppose I have a situation where I'm designing a website for a shoe reseller. They have different brands and kinds of shoes and of course, they want a really good search function.
So there are ...
7
votes
6answers
878 views
How far to go with typedef'ing primitive types like int
Do you bother typedef'ing most of your number types like this? Or do you just use "int" in most places? It might be more important in my current project with is client / server based and the types ...
7
votes
4answers
690 views
What are the differences between algorithms using data structures and algorithms using databases?
The General Question
What are the differences between algorithms using data structures and algorithms using databases?
Some Context
This is a question that has been bugging me for some time, and I ...
7
votes
4answers
377 views
finding houses within a radius
During an interview I was asked given the following: A real estate application that lists all houses that are currently on the market (i.e., for sale) within a given distance (say for example the user ...
7
votes
2answers
326 views
Using a stream manipulator (endl) or a newline escape character (\n)?
I don't have a specific context in which I'm asking the question, but while I was reading a beginner book on C++ I noticed the use of both an endl stream manipulator and a newline escape character ...
7
votes
1answer
223 views
How to design data structures for sharding?
When designing data structures for an application, what are some best practices to make sure it can be sharded?
In particular, which of the following is better:
Creating relationships in databases
...
7
votes
1answer
457 views
Ideal data structure/techniques for storing generic scheduler data in C#
I am trying to implement a generic scheduler object in C# 4 which will output a table in HTML. Basic aim is to show some object along with various attributes, and whether it was doing something in a ...
7
votes
1answer
254 views
Optimal Data Structure for our own API
I'm in the early stages of writing an Emacs major mode for the Stack Exchange network; if you use Emacs regularly, this will benefit you in the end.
In order to minimize the number of calls made to ...
6
votes
3answers
2k views
EAV - is it really bad in all scenarios?
I'm thinking to use EAV for some of the stuff in one of the projects, but all questions about it in stackoverflow end up to answers calling EAV an antipattern.
But I'm wondering, if is it that wrong ...
6
votes
2answers
743 views
Will B-Trees and Other Data Structures Become Obsolete With The Advent of Solid State Drives?
Many (perhaps most?) database applications today use B-Trees and variations to store data, because this data structure optimizes the read, write and seek operations on a hard disk (and these ...
6
votes
4answers
3k views
How to quickly search through a very large list of strings / records on a database
I have the following problem: I have a database containing more than 2 million records.
Each record has a string field X and I want to display a list of records for which field X contains a certain ...