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

learn more… | top users | synonyms

1
vote
1answer
40 views

Data Structure for Form or Survey

I am planning an app which allows users to complete surveys/forms. I'm having trouble planning the data schema for the forms. I really want to have a data structure which can be mostly automatically ...
-4
votes
0answers
32 views

Usage of (advance) data structures? [on hold]

We all are pretty much aware about Big Table is one of the data structure used by Google. There must be some other data structures used by industry leaders like Google, Microsoft, and Facebook. Can ...
2
votes
2answers
113 views

Can a tree be used to create a stack?

I'm aware that linked lists, sets and arrays can be used to create stacks by themselves. The theory behind it is this linked-list: In some languages, a linked-list is substitutable for an array. ...
-2
votes
1answer
34 views

Considerations when making data structure and algorithm choices [on hold]

What are some reasons you may choose a worse runtime algorithm? And what are some advantages of a linked list vs a hash table/array where access is constant time.
4
votes
1answer
122 views

Developing a system that connects to any datasource without much/any source-specific code [on hold]

We are a small team doing work on a LoB system that needs to connect to varied systems such as ERPs and CRMs to extract business processes like invoices, customer info, production orders and the such, ...
1
vote
2answers
48 views

DB Design for non static front-end

I have a question about best practices to design a database which have to hold the following data: There is a page with a questionnaire which has default questions like Firstname, Lastname, Street... ...
5
votes
1answer
146 views

Is it possible to have these characteristics in a data structure?

I was tutoring a student that came up with this assignment. It basically requires a data structure with the following characteristics: it holds a set of integers in {1, 2, ..., n} n is power of 2 ...
7
votes
2answers
292 views

Is using this complex data structure bad practice?

Right now in my current company I must "parse" a csv and extract some data out of it (in the sense of data mining). I surprised myself by defining the following data structure (Java 8): static ...
-1
votes
0answers
69 views

Can we create variable length arrays in c++ [migrated]

I am trying to create this simple program which displays the data of the array back to the user again.. I want to create a variable length array. In this program the user is first asked the number of ...
1
vote
0answers
82 views

Configuration data structure for initialization [closed]

Many applications make use of configuration data structures. One could imagine the different subsystems of the application initializing themselves from the configuration data by walking it ...
6
votes
6answers
239 views

Should I always store parsed data in database before manipulating?

I am about to start a new project which involves taking an excel file, parsing the data (php-excel-reader) and then using the parsed values in a HTML email. My question is pretty simple. Is it better ...
10
votes
4answers
223 views

Is there a standard way or standard alternative to packing a struct in c?

When programming in C I have found it invaluable to pack structs using GCCs __attribute__((__packed__)) attribute so I can easily convert a structured chunk of volatile memory to an array of bytes to ...
1
vote
1answer
103 views

Suggestions for structuring complex json structures?

I can't find many tips for how to design complex json structures beyond the obvious tips of not trying to nest too deeply, using defined data types, etc. For example, if I have a location that needs ...
3
votes
3answers
82 views

Is it odd if Nodes in a LinkedList held references to the List object?

Its like, I want to call .moveToBefore(Node) on a Node object and have the node relocate to before the node passed in. The problem arises if the node passed in is the head node. The List object will ...
5
votes
3answers
130 views

How to create “constructors” for structures in C

The problem I have this structure that I want to create a "constructor" for it. struct example { int x, y, z; /* various members */ struct another *another; /* pointer to another structure ...
0
votes
0answers
19 views

Joins between datasets in data models

I'm struggling to understand how to join data between data domains in application properly. Say, I have three domains, User, Post and Like: User - id - login - password - active - ... Post - id - ...
0
votes
0answers
39 views

Bounded Priority queue with constant time amortized delete min and insert

Given a bounded priority queue (with keys between 1 and k), is there any data structure with amortized constant time for delete min and insert and find min, where the worst case time for these ...
-2
votes
1answer
59 views

Should I be using XML to store configuration values in a database?

There are a couple of answers on SE comparing single-row table vs. name-value-pair table used for config settings, but I haven't seen anyone arguing for using XML (or JSON) as a name-value pair ...
8
votes
2answers
309 views

Workaround for implementing operations on doubly linked or circular data structures in languages with immutable data

I would like to learn how to make graphs and perform some local operations on them in Haskell, but the question is not specific to Haskell, and instead of graphs we may consider doubly linked lists. ...
9
votes
4answers
449 views

What is the most efficient way to store this data?

I am in charge of rewriting some old VB code. I understand how it works, but I feel like there is a far-more efficient way to do what they did. I just can't figure out what it is. Here is a contrived ...
1
vote
1answer
39 views

Efficiently determining many-to-many subset relation

I'm doing market basket analysis. I have a set of transactions. Every transaction is a set of items that were bought. I then have a set of itemsets (i.e. a set of items) that I want to determine the ...
-2
votes
1answer
66 views

Comparison of Red/Black Tree to Java ArrayList, what are advantages of each? [closed]

I was looking over some of the general Big-O Algorithm Complexities for different data structures, and wondered what Java's ArrayList would be considered. Since I tend to default to an ArrayList in ...
3
votes
3answers
109 views

At what volume is a specific data structure considered useful

I had this discussion with co-workers before. We had to store users by id and we'd do mostly Add/Get operations on it. I proposed to use a Dictionary which seems like the logical choice. My co-worker ...
0
votes
1answer
55 views

Data structure for effects animation? [closed]

I'm making a prototype for a game. I'm working on effects at the moment, but more generally animation. Currently, I have list where newly spawned effects are added to. Then on the update section ...
-1
votes
2answers
63 views

Abstract Syntax Tree with parent or not? [closed]

My question is as simple as the title says -- should I implement AST with parent or not? Currently I implemented it with parent -- the benefit of that approach is, that whatever I use, I can go up or ...
0
votes
1answer
91 views

Why aren't data structures like BSTs part of the core libraries of more languages? [closed]

For example, why doesn't JavaScript provide a BST as a native data structure you could use? var bst = new BST(); bst.insert('5'); bst.insert('3'); bst.find('5'): Alternative question: what are the ...
4
votes
2answers
99 views

Sort a list while putting together or after?

I have to read through an extremely large amount of network data from various log files, and compile relevant information about that data to perform statistical analysis on it (the top communicators, ...
1
vote
0answers
87 views

Best datastructure to use

I am using Amazon's dynamodb nosql database and as a result I need to think of some ways to do certain operations to fit into their limits (e.g 4k item limit, can't combine small items into the same ...
0
votes
1answer
34 views

What structure has nodes with inputs and outputs? [closed]

If I have a bunch of nodes with differing numbers of inputs, but only one output, and each output can go to multiple inputs, but only one output per input; what do I call it? Trying to name a class ...
2
votes
2answers
153 views

Design pattern for fetching data in chunks

I am creating Qt application that uses database with huge amount of data to draw some charts. Fetching data from the database is time consuming, so is blocking the application thread or worker thread ...
3
votes
2answers
128 views

Should Linked Lists always have a tail pointer?

My understanding... Advantages: Inserting at the end is O(1) instead of O(N). If the list is a Doubly Linked List, then removing from the end is also O(1) instead of O(N). Disadvantage: Takes ...
3
votes
1answer
122 views

What Lisp data structure to use?

I am studying different language games and trying to implement them in Common Lisp. Currently, I am studying a game which studies the relation between forms and meanings. An agent needs to store the ...
1
vote
1answer
181 views

Merging Two Binary Search Trees

What time in terms of Big O will it take to merge two BST's in One? Each having no of nodes n and height O(log n) with no common element. Resultant should be also a BST
32
votes
5answers
5k views

Why is deletion usually much harder to implement than insertion in many data structures?

Can you think of any specific reason why deletion is usually significantly harder to implement than insertion for many (most?) data structures? Quick example: linked lists. Insertion is trivial, but ...
1
vote
2answers
69 views

Objects with boolean data type

I have a collection of objects, and for each of them I need to know if a specific condition has been met. That is a ternary condition, it could be not yet tested, tested and failed, or tested and ...
1
vote
2answers
196 views

How can I represent a flowchart, complete with conditional logic using JSON or XML?

One part of a project I'm working on is interactive scripts for call centre staff. Pretty much every possibility I can think of in this case can be represented on paper as a flowchart, which is why ...
2
votes
3answers
168 views

How does google calculate travel distance/time

I've been working for quite a while now on a service that generates optimal routes for a given set of addresses and vehicles (Vehicle routing problem / traveling salesman problem). Now it's all ...
4
votes
1answer
775 views

Why is there not a basic SortedList<T>?

As far as I know, there is no way to get a List<T> with the capacity to sort itself. If I add a element, I want the data-structure to insert it in the right position (based on the associated ...
3
votes
1answer
125 views

What to do when properties of a HashMap and ArrrayList are neccessary?

I have a data structure that stores various permission groups for a multiplayer game server. There is an instance of a "Rank" class for each permission group. Each rank also has a name. I need to be ...
1
vote
3answers
46 views

Find likely candidates for visited locations along gps track

I'm creating a visualization tool for workout data, specializing on bicycle rides. I'm looking for ways to generate more value from the data that was recorded. Since there usually is a GPS track ...
8
votes
2answers
247 views

How do I store multiple views of data in memory?

I have a bunch of modules. I can break these modules into different categories that are complete and do not overlap. For example, three categories, with ids that can be expressed as Animal, Vegetable, ...
2
votes
3answers
324 views

Which C# data structure should I use to quantify this information?

I am attempting to determine which data structure I should use for the following information: ("Water", 100F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, ""); ("Tuna", 60F, 184F, 30F, .01F, ...
3
votes
2answers
69 views

Implementing incremental builds [closed]

I'm working on a toy language. Until now, multiple files have been compiled by merging the ASTs of each file and then running the semantic analysis and code generation phase on the merged AST. Now ...
2
votes
0answers
25 views

Use dictionary value property as the dictionary key

I am creating an AST, and I am currently introducing the concept of "scope". By implementing a scope, wherever an identifier (variable name) is used, I am able to determine its original declaration. ...
2
votes
2answers
230 views

iOS Core data & NSUserDefaults

I am creating an App where users can search items from an external API. If the users likes an item they can store them into their personal "favourites item list". My question is, is it a good ...
2
votes
1answer
144 views

Does a tree node have an ancestor?

Below is a rooted tree, where any node C except root has one parent P Ancestors of a node C are the nodes on path from C to root, including P,P's parent,P's grandparent, .... till root. My ...
2
votes
1answer
92 views

Database Structure: A product that will only temporarily be available and then slightly change

I'm trying to migrate lagacy data to a new eCommerce system which I'm building myself and I have full control over (so I can modify it however I want). There is a product that came with a free gift ...
0
votes
2answers
580 views

C: How does struct node * next work? [closed]

In C, for creating linked list we write: struct Node{ int data; struct Node* next; }; So, my understanding is "struct Node* next" is a pointer variable of "Node" datatype. But how does it point to ...
2
votes
1answer
65 views

Time complexity of update and lookup in binary random access list

I'm trying to get through one of the exercises in Okasaki's "Purely Functional Data Structures," where he presents a zeroless binary numbers as a structure for random-access list, and asks to 9.6 ...
1
vote
2answers
147 views

Lots of independent data structures into one big one

I have 10 independent data structures that contain unsigned bytes and bit fields from different data sources. I am using C++, and was looking for a way to combine all these data structures into one ...