Questions regarding efficient storing and representing data within a software application.

learn more… | top users | synonyms

7
votes
4answers
705 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 ...
2
votes
1answer
217 views

List structures in memory

Could anyone give an overview of how list structures which are composed of a head and a tail which references the rest of the list i.e linked list are represented in memory of the computer? Does the ...
2
votes
4answers
1k views

Data Structures usage and motivational aspects

For long student life I was always wondering why there are so many of them yet there seems to be lack of usage at all in many of them. The opinion didn't really change when I got a job. We have ...
12
votes
11answers
3k 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 ...
3
votes
1answer
160 views

What conventions or frameworks exist for MVVM in Perl?

We're using Catalyst to render lots of webforms in what will become a large application. I don't like the way all the form data is confusingly into a big hash in the Controller, before being passed to ...
4
votes
1answer
670 views

Which data structure to represent a triangular undirected graph

I was wanting to create a graph similar to this in C++: The one I will implement will have more edges and vertices, but will use this triangle style. I was wanting to create something that I could ...
8
votes
4answers
332 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, ...
3
votes
1answer
213 views

Logic required to solve a problem relating to location of objects

I have raised a question on dba.stackexchange.com but as the heart of my question is in fact to do with logic I have raised a more general representation of my issue here. I think it is the right ...
1
vote
4answers
262 views

Is it better to use a Database or a data structure for network stack?

I've built a multi threaded messaging application in C and I'm currently using a MySQL Memory table to save the session ID, but I'm not sure whether this was a good decision or not. It works like ...
10
votes
2answers
1k 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
2k 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 ...
41
votes
8answers
3k 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 ...
15
votes
2answers
736 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 ...
18
votes
2answers
697 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, ...
11
votes
2answers
1k 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 ...
6
votes
4answers
3k views

Where would I typically use a Deque in production software?

I'm fairly familiar with where to use Stacks, Queues, and Trees in software applications but I've never used a Deque (Double Ended Queue) before. Where would I typically encounter them in the wild? ...
3
votes
9answers
579 views

Standardized Data Structure Interface

I want to work with a variety of data structures (arrays, singly/doubly linked lists, sorted structures, etc.) on a plug-and-play basis. For example, I want to be able to easily swap in and out the ...
2
votes
1answer
1k views

Keeping binary search tree balanced

I am educating myself on algorithms and data structures. For that, I am doing a simple program that would read lines like this: bdhj 168.24 dahf 42.88 dhfa 128.92 First column represents an account ...
2
votes
2answers
457 views

How would you transfer data between your data structures and databases?

I'm learning programming in school and I have this question that's bugging me about data structures and transferring the information stored inside them to databases. We're doing just small systems - ...
-3
votes
1answer
619 views

Writing-Reading a hashtable to a text file

I'm implementing a hashtable structure for a dictionary. Dictionary is in a text file. There are 2 words on each line. I'm generating the hashtable by using the first word as a key. I'm holding the ...
2
votes
4answers
951 views

Is it possible to efficiently store all possible phone numbers in memory?

Given the standard North American phone number format: (Area Code) Exchange - Subscriber, the set of possible numbers is about 6 billion. However, efficiently breaking down the nodes into the sections ...
0
votes
1answer
187 views

Whats the difference between a Ledger and a list of transactions?

re: algorithm and data structure concepts When accountants talk about Ledgers they have something very specific in mind. As a programmer I'm very used to thinking about tables of information, but ...
1
vote
2answers
636 views

In order traversal of M way Trees

If we have a 4 way tree such as the one shown below, and we do an in order traversal, what would the output of the in-order traversal be for an M-way tree? In which order would the nodes be visited? ...
3
votes
3answers
361 views

What is the name of this tree?

It has a single root and each node has 0..N ordered sub-nodes . The keys represent a distinct set of paths. Two trees can only be merged if they share a common root. It needs to support, at minimum: ...
11
votes
7answers
4k 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 ...
5
votes
4answers
263 views

Users creating instances from a template - is there a software pattern that corresponds to this use case?

I am looking into designing a system where users build a template item and then create many instances based on this template.They then need to be able customise each instance but I also need for them ...
9
votes
5answers
2k 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 ...
6
votes
4answers
257 views

Is there a pattern that will help with this data structure

I'm doing a java project. My main structure contains 2 lists with elements of type A the other type B. B itself contains a list of objects which may contain elements of A. It must be that when an ...
0
votes
1answer
160 views

Which one of these implementations is more appropriate for my REST api?

Background So I have a REST API that allows for client applications to access and manipulate users' data. I'm in the process of writing an Objective-C class for simple utilization of this REST API, ...
1
vote
3answers
1k views

How should I implement a secure priority queue in C?

I have an assignment to implement a priority queue in C as well as make an app that uses it. I, however, only know basic-level C (I do know Java). My intuition says that I need to learn pointers. ...
3
votes
1answer
121 views

How should I deal with external data sinks?

I recently took on a contract job that will largely involve generating data feeds from my client's data and sending it to external partners, via feeds and API invocations. I've always found this ...
1
vote
2answers
154 views

Using a column to store the company or a separate database?

I am writing an system for the company to put their promotion material on the site, which is like some kinds of CMS. So, I need a database that store their data, but I am considering how to store ...
5
votes
3answers
359 views

Hashing growth strategy

What is a good growth strategy for hash tables? If the number of elements exceeds the number of buckets, I increase the number of buckets with the following formula: n = int(n * 1.618033988749895) | ...
4
votes
1answer
312 views

Website with test data files for specific algorithms/data structures?

Is there any website, like SPOJ and Project Euler, with the test data files available for specific algorithms/data structures? I know it's a fun challenge to solve those problems on your own, but I ...
6
votes
2answers
931 views

What data structure could I use for modeling a network of nodes and edges?

My application needs to model of and perform operations on a network with 40 - 50 nodes and typically less than 6 edges per node. Both nodes and edges are objects with around 1K data each. During ...
1
vote
1answer
910 views

Website or any material to practice algorithms that explains the solution

I know some projects and web pages for practicing algorithms like TopCoder and Project Euler. However, they just dictate the solution of a particular problem. I wonder if there is a resource, ...
1
vote
1answer
325 views

Need help with algorithm for sorting list

The answer is probably obvious but not to me at this moment, so I was wondering if somebody who is better with sorting algorithms can help lead me in the right direction. This is not homework, I am ...
12
votes
5answers
2k 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 ...
10
votes
7answers
2k 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 ...
0
votes
2answers
427 views

Adding ordered nodes to tree in arbitrary order

I have a database of nodes. Each node can have exactly one parent, but any number of children. Some nodes may be stored with no parent, but at run time, I can create a default "root" node to be the ...
1
vote
2answers
466 views

What are the most common options for data storage in desktop applications?

When I was working as a website designer/engineer I primarily used databases for storage of much of my dynamic data. It was very easy and convenient to use this method and seemed like a standard ...
3
votes
4answers
496 views

Search algorithm with co-ordinate (x,y) hints?

I am about to start writing a UI view where many small text items are laid-out over the view and when the user hovers over a text item a dynamically-generated image is displayed (like a tooltip), ...
4
votes
4answers
426 views

Building a route creator

Ok, already up front, I'm going to tell you, that this is a bonus task for Data structure course I'm taking. That should take care of all the questions whether or not this is for a homework. Route ...
4
votes
2answers
2k views

Is there a way to handle nested Collections more elegantly?

My question is rather a design question. In my program I got to a data structure that looks something like this: private ConcurrentHashMap<A, ConcurrentHashMap<B, ConcurrentHashMap<Integer, ...
3
votes
3answers
728 views

Data Serialization to process business logic

Going by the general principle of data abstraction, I normally abstract data in a serialized format(JSON) and pass it as a parameter to the Business Logic(BL) modules such that the BL module always ...
5
votes
2answers
697 views

Do you get the benefits of a B-Tree in a managed language?

My understanding is that one of the key features of a B-Tree (and a B+Tree) is that it is designed such that the size of its nodes are some multiple of the block size of whatever media the data is ...
4
votes
1answer
2k views

How good is The Algorithm Design Manual 2nd edition compared to the 1st edition for a beginner?

I'm looking for a good book on algorithms and data structures for a beginner. I was reading some reviews of these two books: Introduction to Algoritms and The Algorithm Design Manual. Introduction to ...
5
votes
5answers
1k views

Where should date formatting take place in an MVC pattern?

Suppose that you want to show a user list, on a web application having to handle custom date formats (depending on current selected interface language). Several locations for applying the date format ...
1
vote
2answers
2k views

Determining whether two binary search trees have the same set of values

This is an interview question: Given two Binary Search Trees, write a program to determine whether they contain the same set of values. Assume there are no duplicates. My idea is to perform an ...
1
vote
3answers
219 views

Implicitly or explicitly sorted elements?

So, I've got the following problem: I have a number of ordered elements, ordered in the following way: Type 1: Must be the first element. (only one possible, always present) Type 2: Must be the ...