I've given this a lot of thought but haven't really been able to come up with something.
Suppose I want a m X n collection of elements sortable by any column and any row in under O(m*n), and also the ability to insert or delete a row in O(m+n) or less... is it possible?
What I've come up with is a linked-grid, where the nodes are inser...
I have a list of ~9000 products, and some of which may have duplicates.
I wanted to make a HashTable of these products with the products serial number as their key so I can find duplicates easily.
How would one go about using a HashTable in C#/.NET? Would a HashSet be more appropriate?
Eventually I would like a list like:
Key-Seri...
With an assignment dealing with access control lists, it was required to construct a doubly-linked list first, as Java doesn't include that in the SUN API. I can understand if the professor wanted us to create the Doubly Linked List from scratch to understand how it works (like writing a sort program vs using the baked in methods), but w...
I have data like..
1 -> a 10
b xyz
c 40
12 -> a 20
b os
8 -> ..............
how to store this data in data structure. which DS is suitable for it in C#.
1,12,8 are the object no. & a,b,c are the there attribute key & value pair.
it is internal file representation of .. file.
So i want to store it for further manipul...
Hello,
I am translating some lisp code to Tcl and wonder if there is anything like lisp's defstruct in Tcl for creating data structures?
If nothing is built into Tcl, what extension packages to Tcl would you recommend that can be used in a commercial application.
Thanks.
-William
...
We all know there are plenty of self-balancing binary search trees (BST), being the most famous the Red-Black and the AVL. It might be useful to take a look at AA-trees and scapegoat trees too.
I want to do deletions insertions and searches, like any other BST. However, it will be common to delete all values in a given range, or deletin...
I am looking for an efficient way to solve the following problem.
List 1 is a list of records that are identified by a primitive triplet:
X | Y | Z
List 2 is a list of records that are identified by three sets. One Xs, one Ys, one Zs. The X, Y, Zs are of the same 'type' as those in list one so are directly comparable with one another...
I've been reading about using the winged-edge data structure for storing a boundary representation. However, the linked site says that this is one of the oldest data structres for storing b-reps, are there newer better ones?
Secondly, is there an implementation of this in C#?
...
i want to create table to keep histroy of the ammendments & history of the object.
for That i have created two column Primary Key ( Id & update date)
I have 3 more date columns to maintain history & Status Column for Actual object history.
Status , StatusFrom , Statusto, UpdateDate & NextUpdateDate
UpdateDate & NextUpdateDate is for ma...
I don't know what data structure to use for this problem. I want the structure to have:
Constant time insertion or deletion.
Constant time retrieval by id.
The actual system is:
I've got a bunch of objects each with a unique id. My program will need to receive requests for an id and return the relevant object.
Whenever it receives...
I'm looking for a container that provides fastest unordered iterations through the encapsulated elements. In other words, "add once, iterate many times".
Is there one among OCaml's standard modules that is fast enough (such that further optimization of it would be useless)? Or some kind of third-party GPL-ready ones?
AFAIK there's ju...
Here's a description of the data structure:
It operates like a regular map with get, put, and remove methods, but has a sort method that can be called to sorts the map. However, the map remembers its sorted structure, so subsequent calls to sort can be much quicker (if the structure doesn't change too much between calls to sort).
For e...
UPDATE:
I thought it was Windsows.h i need to include and you have confirmed this, but when i do include it i get a bunch of messages like the following...
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(5934) : error C2872: 'IDataObject' : ambiguous symbol
1> could be 'C:\Program Files\Microsoft SDKs\Windows\v6....
hi,
I have two base structures like following :
struct stuSectionProperties
{
int Field1; // Row | BoxNo | SplitterNo
int Field2; // Col | Adapter | -
double Latitude;
bool IsEast;
int Band;
int CableNo;
SDP::Global::enuSections::Type Section;
stuSectionProperties()
{
this->Field1 = -...
I wanted to know how important it is to use InnoDB table and transactions for an auction website.
I know that when there is payment involved the transactions are important, but in this case, there are only bids placed.
The bids that are placed however are placed very quickly, maybe a few every second.
I was wondering if i couldn't ju...
I am looking for a library that can run on Java ME (Foundation Profile 1.1, CDC) and allows me to basically do something along the lines of
FILE OF type;
in Pascal.
Background: I need to have a largish (approx. 100MB) set of around 500.000 records for lookups by a known index value quickly. Do I really have to write this myself? Dat...
I have a library which returns a hierarchical list composed of IDictionary, IList and primitive types (string, and ints). At present I cannot change how this data is returned.
I have another strongly typed class which is consuming this data and converting it into business objects. There is a list of "properties" in the data returned, wh...
I'm sure I'm making this harder than it needs to be.
I have a vector...
vector<Joints> mJointsVector;
...comprised of structs patterned after the following...
struct Joints
{
string name;
float origUpperLimit;
float origLowerLimit;
};
I'm trying to search mJointsVector with "std::find" to locate an individual joint...
Possible Duplicate:
What is a good book to study data structures in C?
Please recommend a good beginner-intermediate book on data structures.
Preferably a printed book, with code in C (or language-agnostic).
...
when implementing a heap structure, we can store the data in an array such that the children of the node at position i are at position 2i and 2i+1.
my question is, why dont we use an array to represent binary search trees and instead we deal with pointers etc.?
thanks
...