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

learn more… | top users | synonyms

6
votes
1answer
294 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 ...
6
votes
1answer
2k views

What is the usage of Splay Trees in the real world?

I decided to learn about balanced search trees, so I picked 2-3-4 and splay trees. What are the examples of splay trees usage in the real world? In this Cornell: ...
3
votes
1answer
1k views

How should I architect my Model and Data Access layer objects in my website?

I've been tasked with designing Data layer for a website at work, and I am very interested in architecture of code for the best flexibility, maintainability and readability. I am generally acutely ...
1
vote
2answers
710 views

Count function on tree structure (non-binary)

I am implementing a tree Data structure in c# based (largely on Dan Vanderboom's Generic implementation). I am now considering approach on handling a Count property which Dan does not implement. The ...
5
votes
2answers
284 views

Data structures for storing finger/stylus movements in drawing application?

I have a general question about creating a drawing application, the language could be C++ or ObjectiveC with OpenGL. I would like to hear what are the best methods and practices for storing strokes ...
2
votes
1answer
320 views

2D grid with multiple types of objects

This is my first post here in programmers.stackexchange (I'm a regular on SO). I hope this isn't too general. I'm trying a simple project to learn Java from something I've seen done in the past. ...
3
votes
3answers
549 views

Internal Mutation of Persistent Data Structures

To clarify, when I mean use the terms persistent and immutable on a data structure, I mean that: The state of the data structure remains unchanged for its lifetime. It always holds the same data, ...
6
votes
1answer
166 views

Unit testing a text index

Consider a text index such as a suffix tree or a suffix array supporting Count queries (number of occurrences of a pattern) and Locate queries (the positions of all the occurrences of a pattern) over ...
4
votes
1answer
500 views

Amazon Kindle - Whispersync implementation?

For those who are not aware of Kindle's whispersync, here is how it works (from amazon.com): "...Whispersync synchronizes the bookmarks and furthest page read among devices registered to the same ...
2
votes
1answer
5k views

Most efficient Implementation a Tree in C++

I need to write a tree where each element may have any number of child elements, and because of this each branch of the tree may have any length. The tree is only going to receive elements at first ...
0
votes
1answer
55 views

Create association between informations

I deployed a project some days ago that allow to extract some medical articles using the results of a questionnaire completed by a user. For instance, if I reply on questionnaire I'm affected by ...
1
vote
2answers
1k views

Does the Head(start) pointer of Doubly Linked list points previously to the tail(last) node

I have one question in my mind that in case of circular doubly linked list the head pointer of the doubly linked list also logically point to the next pointer of the tail node of the linked list and ...
3
votes
3answers
562 views

Data structure: sort and search effectively

I need to have a data structure with say 4 keys . I can sort on any of these keys. What data structure can I opt for? Sorting time should be very little. I thought of a tree, but it will be only help ...
9
votes
4answers
2k 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? ...
1
vote
2answers
996 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 ...
17
votes
5answers
6k views

Configuration data: single-row table vs. name-value-pair table

Let's say you write an application that can be configured by the user. For storing this "configuration data" into a database, two patterns are commonly used. The single-row table CompanyName | ...
0
votes
5answers
1k views

Learning basic algorithms - better C or C++? [closed]

I'm studying fundamental algorithms (quicksort, mergesort, binary trees, etc..) and I'm going to re-code every algorithm by scratch to learn how they work. Should I code them in C or C++? I think with ...
6
votes
4answers
435 views

Understanding the Macro Aspects of Data Structures

I am studying data structures right now, but I still need to find a teacher/site/book with a clear explanation of the macro aspects of this topic. What I mean is: most lessons/text books mix ...
1
vote
3answers
269 views

I want to create an open data format… but I don't really know what that is

I have found a need for a standardization for storage and recording of data relating to diabetes information (I don't think there's any, but I may have missed it). To that end I made this github ...
10
votes
3answers
4k 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 ...
0
votes
1answer
175 views

Converting data-structure in Perl [closed]

A function produces this hash of arrays: 'KEYNAME1' => ARRAY(0x1edeeb0) 0 'val11' 1 'val12' 2 'val13' 'KEYNAME2' => ARRAY(0x1efacb8) 0 'val21' 1 'val22' 2 'val23' ...
7
votes
5answers
2k views

What do you call classes without methods?

What do you call classes without methods? For example, class A { public string something; public int a; } Above is a class without any methods. Does this type of class have a special name?
1
vote
1answer
260 views

hash with file instead of array

Is it possible to use hash function but with File instead of Array, and it's gonna be saving the record in a file position and then search will fseek to that position, but I'm not sure how to open a ...
0
votes
7answers
5k 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 ...
3
votes
8answers
1k views

Strategy/algorithm to divide pot to chips

I want to split poker pot to chips. Example: Pot = $17.500. I have the endless piles of chips. I have the following types of chips: ChipsTypes = [$1, $5, $10, $25, $100, $500, $1.000, $5.000, ...
4
votes
4answers
521 views

Appropriate data structure for deeply nested data?

I can't figure out what would be an appropriate data structure for my problem. I need to write a script that will count some events. Input is a list of events (thousands of them). Each event is an ...
7
votes
1answer
5k views

Decision trees vs. Neural Networks

I'm implementing a machine learning structure to try and predict fraud on financial systems like banks, etc... This means that there is a lot of different data that can be used to train the model eg. ...
99
votes
24answers
55k 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 ...
1
vote
2answers
115 views

Cataloging events, projects and tasks: Is SQL appropriate?

I have this idea for a database: it would hold everything I "need to remember", and allow future coding projects to access the information. These future projects include a day-planner and historical ...
1
vote
5answers
1k views

What Java data structure/design pattern best models this object, considering it would perform these methods?

Methods: 1. getDistance(CityA,CityB) // Returns distance between two cities 2. getCitiesInRadius(CityA,integer) // Returns cities within a given distance of another city 3. ...
7
votes
3answers
711 views

A deque based on binary trees

This is a simple immutable deque based on binary trees. What do you think about it? Does this kind of data structure, or possibly an improvement thereof, seem useful? How could I improve it, ...
6
votes
4answers
456 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 ...
1
vote
1answer
368 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 ...
7
votes
4answers
824 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
2k 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 ...
13
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
167 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
743 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
339 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
270 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
2k 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
786 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
741 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
2k 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 ...
8
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
641 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 ...