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

learn more… | top users | synonyms

1
vote
1answer
280 views

Javascript: Safely upload a client data file

I'm (still) working on a template-based XML editing program. It's a GUI-based XML editor that only allows users to add certain tags and attributes based off the requirements. You can see the current ...
4
votes
1answer
512 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
318 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
201 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 ...
6
votes
3answers
10k views

Abstract Data Type and Data Structure [duplicate]

It's quite difficult for me to understand these terms. I searched on google and read a little on Wikipedia but I'm still not sure. I've determined so far that: Abstract Data Type is a definition of ...
10
votes
2answers
942 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 ...
39
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 ...
1
vote
3answers
877 views

Programming language with pattern matching in trees

I'd like to prototype a computer algebra system. An equation would be represented by a tree and rules would be defined - similarly to mathematical axioms - by specifying a pattern (in the tree) and a ...
1
vote
4answers
588 views

data structure for file search

I've asked this question before and I got a few answers/idea but I'm not sure how to implement them. I'm building a telecom messaging solution, currently I'm using Database to save my ...
10
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 ...
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 ...
6
votes
4answers
372 views

Is there a way to track data structure dependencies from the database, through the tiers, all the way out to a web page?

When we design applications, we generally end up with the same tiered sets of data structures: A persistent data structure that is described using DDL and implemented as RDBMS tables and columns. A ...
6
votes
2answers
609 views

What is the Bible of Hashing?

Is there a Cormen-like reference on Hashes and Hashing? This particular structure has seen little attention in my CS education for some reason but I'd like to learn more as they seem to be everywhere. ...
6
votes
4answers
2k 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? ...
6
votes
8answers
8k views

What is the difference between an Array and a Stack?

According to Wikipedia, a stack: is a last in, first out (LIFO) abstract data type and linear data structure. While an array: is a data structure consisting of a collection of elements ...
16
votes
2answers
607 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, ...
14
votes
2answers
579 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 ...
8
votes
5answers
4k views

Real world usage of DelayQueue

What would be a real world usage of DelayQueue, what common problem it was designed to solve?
2
votes
1answer
792 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
9answers
496 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 ...
-3
votes
1answer
473 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
2answers
336 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 - ...
15
votes
6answers
2k 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 ...
2
votes
4answers
710 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
1k views

Equivalent of #map in ruby in golang

I'm playing with Go and run into something I'm unable to find in Google, although there is certainly something that exists: I'm using the following struct: type Syntax struct { name string ...
0
votes
7answers
3k views

Why would you use data structures (ie Binary Trees, Linked Lists) in your jobs/side projects? [closed]

It seems to me that, for everyday use, more primitive data structures like arrays get the job done just as well as a binary tree would. My question is how common is to use these structures when ...
0
votes
1answer
159 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 ...
2
votes
5answers
3k views

An XML file or Database?

I am re-writing a section of my site and am trying to decide how much of a rewrite this will be. At the moment I have a web service feed that generates an xml once per day. I then use this xml file on ...
46
votes
8answers
6k 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 ...
1
vote
4answers
248 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 ...
2
votes
4answers
955 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 ...
3
votes
1answer
144 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 ...
8
votes
5answers
1k 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 ...
3
votes
3answers
342 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: ...
10
votes
5answers
19k 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 ...
1
vote
2answers
546 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? ...
5
votes
4answers
247 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
1k 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
248 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
147 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. ...
1
vote
2answers
152 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 ...
1
vote
2answers
768 views

What are the most known arbitrary precision arithmetic implementation approaches?

I'm going to write a class library for .NET which provide an implementation of arbitrary precision arithmetic for integer, rational and maybe complex numbers. What best known approaches should I ...
4
votes
1answer
277 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
769 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 ...
3
votes
1answer
120 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
1answer
294 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 ...
11
votes
5answers
1k 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
1k 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
353 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 ...