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

learn more… | top users | synonyms

2
votes
2answers
164 views

Replacing static classes with global state to a series of POJOs, beginning to feel like an anti-pattern

I'm trying to refactor some code, and one of the major changes is to remove the (ab)use of static classes to give global state. I've tried to split up some of the 'global state' functionality with ...
5
votes
1answer
129 views

Bloom filters or similar, but with no false positive

To improve some lookups, I am considering the use of Bloom Filters. But in my use-case, the most probable outcome is that the element do exists in the target set. Bloom filters can have false ...
1
vote
0answers
46 views

Compound container for storing output from a parser

Consider a hierarchical structure like this directory [ [item_0;item_1;...;item_n] [item_0;item_1;inner_directory[...];item_m] other_directory [...] ] ...
4
votes
3answers
407 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
5answers
453 views

Is my understanding of abstract datatypes correct?

After reading lots of pages on various sites, I came to the conclusion that abstract datatype helps to separate the use of datastructure from its implementation. We can easily map the data into a ...
0
votes
2answers
214 views

Critique the Structure of my Horse Racing Betting Platform

I am creating a program (mostly just for fun) that displays live prices for horse racing markets and the prices that several models predict they should be. I am very interested in the optimal way to ...
0
votes
0answers
43 views

Designing online exam [duplicate]

I need to design an online exam server for an exam like GRE in which question difficulty increases if you answer correctly and decreases if you answer wrong. Questions are multiple choice ...
0
votes
1answer
193 views

Designing online exam

I need to design an online exam server for an exam like GRE in which question difficulty increases if you answer correctly and decreases if you answer wrong. Questions are multiple choice ...
0
votes
1answer
242 views

Is there any practical algorithm / data-structure that can't be done with non-recursive Lambda Calculus augmented with foldl?

In my search for a practical non-turing complete programming language, I've been paying attention to lambda-calculus with disallowed self-application - that is, x x forbidden. After taking that ...
2
votes
3answers
247 views

Why it is `(cons 1 (cons 2 (cons 3 nil)))` and not `(cons 3 (cons 2 (cons 1 nil)))` for [1,2,3]?

Is there any special reason that to construct list in Scheme you use (cons 1 (cons 2 (cons 3 nil))) instead of (cons 3 (cons 2 (cons 1 nil))) ? While the first seems more obvious because it ...
4
votes
2answers
391 views

Is there any particular reason for the use of lists over queues in functional programming languages?

Most functional programming languages such as Scheme and Haskell use lists as their main data structure. Queues are identical to lists, except for the fact appending to the end - not to the begin - ...
1
vote
2answers
154 views

Random access (read/write) in datastructures

Certain datastructures, like Python's Dictionary, are unordered/random read/written. As programming in python is iterative (and programming in general is?), how do these unordered datastructures ...
6
votes
3answers
806 views

Faster reads, on an infinite grid plane, than using a hash table?

In the past, I've had alot of success just using a .NET Dictionary, with a TKey consisting of the X,Y coordinates merged together. However its read performance, despite being amortized constant time, ...
40
votes
6answers
4k views

How necessary is it to follow defensive programming practices for code that will never be made publicly available?

I'm writing a Java implementation of a card game, so I created a special type of Collection I'm calling a Zone. All modification methods of Java's Collection are unsupported, but there's a method in ...
1
vote
0answers
184 views

Most suitable data structure for in-memory string -> int conversion for variable length strings

My project involves validating and normalising email addresses in this format [userpart]@[domainpart].[tld] After syntactic validation of the address, [tld] is checked to exist, otherwise the ...
0
votes
2answers
356 views

PHP SplFixedArray How To Deal With billions of indexes?

I've built a flatfile db system that will work like mini-noSQL system and it split db to smaller files, and I did a SplFixedArray wrapper for it with a method for searching usage built on preg_grep. ...
0
votes
1answer
196 views

Which data structure for representing possible navigations between a game's screens?

I am trying to find an appropriate data structure for representing available navigations between a game's screens. Using a linked list, a node can only have one node after it : inappropriate. Using ...
7
votes
4answers
833 views

How do we keep dependent data structures up to date?

Suppose you have a parse tree, an abstract syntax tree, and a control flow graph, each one logically derived from the one before. In principle it is easy to construct each graph given the parse tree, ...
5
votes
1answer
262 views

Can anyone explain to me what problem Core Data solves? [closed]

Core Data seems to add a needless layer of complexity. If you want to save data created natively by the user in an app why not just use an object and then write the data all to SQLite or back to a ...
1
vote
1answer
79 views

Data structure supporting the following operations

I'm looking for a data structure for working with a set of data which is most efficient to do the following : Check whether an item has been categorized or not. (The categorized and uncategorized ...
-2
votes
3answers
154 views

what would be the best data structure for my situation [closed]

I have a list of unique string. I don't want to destroy this string i need it.I only need to find out weather an given string S exist in this unique list.What would be the best data structure for this ...
0
votes
2answers
134 views

How should I structure my database to gain maximum efficiently in this scenario?

I'm developing a PHP script that analyzes the web traffic of my clients websites. By placing a link to a javascript on the clients website (think of Google Analyses), my script harvests information ...
0
votes
1answer
958 views

I need to create an employee schedule/appointments program, but I don't know how to set it up [closed]

I work for a gym. I am the programmer, its just me, nobody else! Gets really frustrating when there's nobody to bounce conceptual ideas off of. I'm getting rid of our archaic paper binder systems for ...
1
vote
2answers
3k views

Is it wise to store a big lump of json on a database row

I have this project which stores product details from amazon into the database. Just to give you an idea on how big it is: [{"title":"Genetic Engineering (Opposing ...
0
votes
4answers
128 views

Data Structure for Small Number of Agents in a Relatively Big 2D World

I'm working on a project where we will implement a kind of world simulation where there is a square 2D world. Agents live on this world and make decisions like moving or replicating themselves based ...
0
votes
1answer
273 views

How does Google store its PageRank matrix?

I'm curious to know how Google stores the matrix that's used in the PageRank algorithm; and am looking for a data-structure for storing a very-large (not fitting in memory of any one computer) sparse ...
3
votes
2answers
127 views

Reconstructing a tree from depth information

I have a data structure that describes a tree. Nodes are ordered, with "depth" information, and knowing the order and the depth the tree can be reconstructed. I'm not entirely sure how to describe it ...
3
votes
1answer
750 views

Implementing basic data structures in programming interviews [closed]

I have been preparing to do my first technical interview in a month, and I have a question about implementing common data structures like stacks or linked lists. I plan to do the interview in either ...
22
votes
2answers
759 views

Is there a data structure for this type of list/map?

Perhaps there's a name for what I want, but I'm not aware of it. I need something similar to a LinkedHashMap in Java, but where it returns the 'previous' value if there's no value at the specified ...
2
votes
1answer
1k views

Treating a 1D data structure as 2D grid

Hopefully this is a good question. I am working with a native class that represents a 2D image as a 1D array. If you want to change one pixel, for example, you need to now how to derive the index from ...
-1
votes
3answers
2k views

Why are algorithms and data structures important? [duplicate]

It seems like a lot of university-level computer science programs and programmer job interviews focus heavily on algorithms and data structures. I'm curious as to why universities and employers put so ...
1
vote
3answers
223 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
votes
2answers
474 views

Importance of data structures in modern S/W development [closed]

During 1990s when there were no advanced frameworks/paradigms available for S/W development , knowledge on data structures was critical... which I can comprehend. But nowadays, for most of the ...
0
votes
2answers
88 views

How to properly structure a collection of immutable constants

I'm in the design stages of a program that based upon input received, would select a particular category, and action within that category. The category, the action within in, and the value(s) related ...
1
vote
1answer
200 views

Inventory / Stock in multiple locations

I am working on a warehouse management system (WMS) that needs to support having stock in multiple locations. Could be in a different building, could be stored in n* places in a building (quick ...
1
vote
1answer
331 views

Immutable Data Structure For Time Series Data

I'm wondering what the best data structure (for storing data on disk) is for storing immutable time-series data (99% of the data is truly immutable, the 1% is metadata that is separate from the ...
2
votes
3answers
488 views

What arguments can I use to justify the use of either XML or JSON to store and transmit object data?

My project lead considers both of these approaches to be unnecessary overhead. I have been involved in and have witnessed a lot of talk around XML vs JSON, but this is the first time that I have heard ...
2
votes
4answers
291 views

Generic term for “objects” vs “fundamental types”?

What are the exact terms to call data types with a logic structure (like C structures, C++ or Java objects) versus fundamental data types (like numeric types, characters, booleans...) independently of ...
7
votes
3answers
1k views

Architecturally speaking, does a database abstraction layer, such as Microsoft's Entity Framework, void the need for a separate Data Access Layer?

The way it was For years, I have organized my software solutions as such: Data Access Layer (DAL) to abstract the business of accessing data Business Logic Layer (BLL) to apply business rules to ...
0
votes
2answers
224 views

Data structure theory based on graph rewriting [closed]

First of all, I'm looking for a book, publication, project or any kind of information that should probably exceed the limits normally imposed on answers in this kind of forum. I know the rules about ...
3
votes
2answers
737 views

Collection interfaces in C#, coming from Java

In Java, I'm used to declaring collections using the most-abstract interface possible and then constructing them using the concrete implementation that makes sense at the time. It usually looks ...
3
votes
1answer
412 views

Pure C Vector Implementation

I am implementing a vector in C. I am doing this for the fun of programming, for the fun of learning, and for the use of the data structure in later projects. This is not homework. My question is ...
3
votes
1answer
134 views

Is there a name for a randomized heap?

I've made a container which functions like a Binary Heap in terms of insertions and popping the root element. The key difference is that the comparison steps are all replaced with a random call for ...
0
votes
2answers
97 views

By the definition of a Tree(ADT), is it “wrong” for a node to add a sibling?

The title pretty much says it all. I'm just having a little computer science exercise and am building a Tree. I want a node to be able to add a sibling which requires one to first get a reference to ...
0
votes
3answers
158 views

Best data structure for representing English verb forms

I need to come up with a data structure to keep information about English verb forms. In most cases a verb can be in one of 4 forms: base, present participle, past participle and past simple, for ...
1
vote
1answer
115 views

Is there a name for this tree variant?

So I've created (and I'm sure someone else has come up with this before - I'm not claiming to have invented it) a data structure which consists of a binary search tree, only instead of each node ...
9
votes
2answers
585 views

In-memory datastore in Haskell

I want to implement an in-memory datastore for a web service in Haskell. I want to run transactions in the STM monad. When I google hash table steam Haskell I only get this: Data. BTree. HashTable. ...
0
votes
1answer
334 views

Comparing performance of different C++ self-made tree data structures

I have two tree data-structures that I made in C++ , and they give a response for range queries/point queries in that program. I am using Ubuntu. I need help in understanding the way to compare the ...
9
votes
2answers
783 views

Uses of persistent data structures in non-functional languages

Languages that are purely functional or near-purely functional benefit from persistent data structures because they are immutable and fit well with the stateless style of functional programming. But ...
-1
votes
2answers
2k views

What do I need to know about Data Structures and Algorithms in the “real” world [closed]

I just finished the data structures and algorithms course in school , I took it during the summer so 6wks course vs a 16 wk course during the regular semester. So not only was the course hard but it ...