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

learn more… | top users | synonyms

0
votes
0answers
18 views

new Block diagram scheme file format

Yesterday I wanted to show my colleague a work flow diagram representing my view on developing our next project. Today I want to display file structure of another my project with includes as a tree ...
2
votes
2answers
91 views

Is embedding data in a executable considered a good practice?

Embedding data (such as images) in a executable seems to have a few advantages, like easier distribution of the executable and easier compatibility with different OSes. But, is it a good practice? ...
3
votes
2answers
155 views

Why define struct in variable?

Consider the following program: Many people when they want to use a struct, they create a new variable as: struct structureName variableName While it works when you just define it as: ...
-2
votes
0answers
35 views

Source of extensive, battle-tested Unit Tests [closed]

Where can I find solid, proven unit tests for common data structures and algorithms? I'm giving an introductory class, that covers basics such as lists (linked, array-based, tree-based, etc.), ...
8
votes
2answers
899 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 ...
-2
votes
0answers
31 views

Databases or Tables for mobile apps [closed]

Just wondering how many databases an app like Beatthetraffic or Inrix would have? Would each type of entry require separate databases or just different tables?
10
votes
8answers
3k views

Data structure for accessing units of measure

TL;DR - I'm trying to design an optimal data structure to define units within a unit of measure. A Unit of measure is essentially a value (or quantity) associated with a unit. SI Units have seven ...
2
votes
0answers
36 views

Merge directed acyclic graphs minimizing number of nodes

I have some DAGs (directed acylic graphs) and I want to merge them in order to minimize the number of nodes (we could say that every node has a cost, while edges are free). These four different DAGs ...
0
votes
2answers
89 views

What are the application areas of hash tables or hashing? [closed]

Hashing means generating a record's physical address using its primary key. So it helps in searching a record with least delay. So, any application areas where this concept is used? I suppose most ...
1
vote
1answer
210 views

Graph data structures and journal format for mini-IDE

Background: I am writing a small/partial IDE. Code is internally converted/parsed into a graph data structure (for fast navigation, syntax-check etc). Functionality to undo/redo (also between ...
7
votes
3answers
902 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. ...
1
vote
2answers
327 views

How to present a stable data model in a public API that allows internal data structures to be changed without breaking the public view of the data?

I am in the process of developing an application that allows users to write C# scripts. These scripts allow users to call selected methods and to access and manipulate data in a document. This works ...
1
vote
1answer
66 views

Data structure for traversing hierarchical hostnames

So, quite often I'll come across a situation where I'd like to process hostnames in a hierarchical manner. For example, given a hostname "foo.bar.baz.example.com", I might want to compare it against ...
3
votes
2answers
205 views

Why Do B+ Trees Have a Minimum Occupancy of 50%?

As far as I can tell, the basic operations (add, delete, search) on a B+ Tree would function the same if minimum occupancy was 1, or 1/3, or any other function on node size. All the sources available ...
0
votes
1answer
123 views

calculating the average of a value over a month [closed]

I am working on a project right now that is having me calculate monthly interest on a bank account. The way the interest is supposed to be calculated is as follows: Use the daily average to calculate ...
0
votes
1answer
45 views

Efficient storing and multidirectional lookup of hierachical data

I make a game and among others I have nations, provinces, tiles and armies. Each army belongs to exactly one tile, each tile belongs to exactly one province, each province to exactly one nation. I ...
2
votes
1answer
290 views

Is using MultiMaps code smell? If so what alternative data structures fit my needs?

I'm trying to model nWoD characters for a roleplaying game in a character builder program. The crux is I want to support saving too and loading from yaml documents. One aspect of the character's is ...
2
votes
2answers
181 views

Most efficient way to store this collection of moduli and remainders?

I have a huge collection of different moduli and associated with each modulus a fairly large list of remainders. I want to store these values so that I can efficiently determine whether an integer is ...
0
votes
1answer
85 views

Handling the process of large-scale lists [closed]

What are the efficient ways to process huge lists (+10 millions), and things to consider while manipulating huge lists. First question, when should I use recursion, and when I shouldn't. In both ...
48
votes
9answers
8k 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
votes
1answer
64 views

How implement a doubly linked list using single pointer inside? [closed]

struct{ int value; int *pointer; } I want to make doubly linked list using the above structure.
0
votes
1answer
100 views

Method ordering

This is the type of question that one would probably get in an exam, but now it happens to be in the real word. :-) I would appreciate some advice regarding the datastructure/algorithm that can be ...
2
votes
0answers
67 views

Data structure well suited for duplicate entries

I'm in the process of getting to know (modern) filesystems. As part of it, I came across log structured filesystems that also handle allocations in a log structured way. I wonder how they handle ...
1
vote
1answer
40 views

Is it a good idea to use bloom filters for this scenario?

I have a theoretical social network where two people, A & C, can become friends if and only if, they have a common friend B amongst them. The simplest solution is to iterate over the two lists ...
0
votes
1answer
278 views

Find possible variations of one item out of multiple baskets.

I have three baskets of balls and each of them has 10 balls which have the following numbers: Basket 1: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 Basket 2: 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 ...
0
votes
0answers
32 views

Arduino ADC value and practices to store data to buffer

I'm writing Arduino application which has timer interrupt to acquire ADC value. Main loop has serial transmission procedure to send data from buffer. I'm not sure how to store data in buffer. Best ...
0
votes
1answer
82 views

What is a good way to store geographical data for distance calculations

What would be the best way to store data in a database for geographical calculations? Say I have an ItemsForSale table paired to a Users table which holds their geo location. I know I can use latitude ...
1
vote
3answers
163 views

Database design: 4 types of users but have different functionality , separate or one table?

I have 4 types of users: Admins , normal user , company , service provider admins and normal user share some attributes (id .first name ,last name ,phone ,mail) company and service provider share ...
3
votes
2answers
87 views

Process to generate hierarchical structure based on relational data?

I have a csv of employee ids, names, and a reference column with the id of their direct manager, say something like this emp_id, emp_name, mgr_id 1,The Boss,, 2,Manager Joe,1 3,Manager Sally,1 ...
2
votes
1answer
97 views

Data structures and algorithms for a directed rooted tree with inherited properties?

I need to represent a directed rooted tree in memory. The caveat is, that nodes have properties. And those properties are inherited (but not 100%) by the child nodes, recursively. What would be a ...
1
vote
1answer
93 views

Best approach to a defined datastructure

I have a plain text file with some data that I can't change, so I have to create a datastructure to use in reading the file and with that datastructure do some thousands of interactions. The file ...
3
votes
0answers
138 views

Lightweight data modeling vs traditional classes [closed]

I've heard a lot of talk about using lightweight data modeling as of late. Especially in relation to the Clojure programming language. What is it and how it differs from traditional classes regarding ...
2
votes
1answer
45 views

BloomFilter in ruby should have k hash functions

I am reading the Bloom Filter implementation written in ruby. It should have k hash functions, but it looks like the same hash function is being used with different seed values. Is this a common way ...
0
votes
1answer
33 views

What would be the return type of a cartesian product of a multiset

I am writing a Multiset in Ruby. The Union, Intersection operations where simple and return a MultiSet. But, I am not sure what the return type of the cartesian product should be, should I return an ...
1
vote
3answers
227 views

Pattern / methodology for representing large database records as objects

A bit of background information: We have an old database application written in Access that lets users monitor their workload, and the code is... 'procedural' might be too kind. The vast majority of ...
1
vote
3answers
1k views

Programming language with pattern matching in trees [closed]

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 ...
4
votes
2answers
181 views

Decimal vs. Integer; Given a fixed range of values, which is preferable for accurate computation?

After getting into a "heated discussion" with someone, I figured I'd ask this question for the sake of posterity. I'm willing to be corrected if my assumption is incorrect but I'd like to hear a ...
8
votes
3answers
682 views

Clean Code and Hybrid Objects and Feature Envy

So I recently made some major refactorings to my code. One of the main things I tried to do was split out my classes into data objects and worker objects. This was inspired, among other things, by ...
1
vote
1answer
139 views

What was the influence of Chris Okasaki's data structures on Scala? [closed]

I heard a friend say: The first real use of Chris Okasaki's book was in Clojure's data structures I heard another friend say: No, they influenced the design of Scala in quite a subtle way. ...
0
votes
3answers
131 views

At what level of abstraction are data structured created?

I am learning about Linked List and Arrays in my data structures class. We are make them in Java. Are actual data structures designed in Java/C? Or are they made in lower level languages like ...
3
votes
3answers
385 views

Separating Code into Smaller Files in C

I am in the process of cleaning up my code and making it easier to maintain. I am doing this by turning my 5000+ line file into separate smaller files. I have successfully created separate source and ...
0
votes
3answers
177 views

Is there a programming pattern, design pattern, or naming convention for moving data between related schemas? [closed]

I'm working on a web application that is publicly accessible. (Really) Long story short, we have two sets of tables in the database with relatively the same names and relatively the same data. The ...
4
votes
3answers
430 views

Is a tree with nodes that have reference to parent still a tree?

If we make reference to the parent for each node in a tree, do we still have a tree (by definition) anymore? Wikipedia definition is: In computer science, a tree is a widely used abstract data ...
4
votes
2answers
2k views

Amortized Analysis? (Worst-case Performance Guarantees)

What is Amortized Analysis? And how can it help me achieve worst-case performance guarantees in my programs? I was reading that the following techniques can help the programmer achieve Worst-case ...
1
vote
4answers
415 views

How to work around Java's lack of pointers to pointers when working with linked data structures? [closed]

I've learned from a textbook how to implement binary search trees recursively in Java, and am working on implementing them nonrecursively. I've found a simple and elegant way to implement an insert ...
0
votes
2answers
395 views

Exercise 3.6: Skiena Algorithm Design Manual

I am preparing for interview and try to solve the exercise problems of the book. 3-6. [5] Describe how to modify any balanced tree data structure such that search, insert, delete, minimum, and ...
1
vote
1answer
139 views

How to efficiently sort a recursively defined Stack?

I am trying to implement a recursively defined Stack and sort it in Java. I don't have a particular usage of this program in mind. I found this approach of stack implementation a bit useful while ...
2
votes
2answers
6k views

How to increase the efficiency of an Immutable Queue in java?

I have been developing an Immutable queue in java, but the version I have developed is supposedly slow and I have been suggested to create a faster version of the same and I have no idea as to how to ...
-2
votes
1answer
168 views

What is the largest size a HashSet or TreeSet be? [closed]

So I am working on a solo project that involves a lot of strings. In one of my smaller test cases there will be at least 70 million elements. So my question is, what is the largest possible size a ...
-1
votes
1answer
231 views

Competitive Programming [closed]

I think this may just be one of the most frequently asked questions by a novice (like me) on this site. Please pardon me for that. My question is I wish to get better at solving the harder problems of ...