How does a T9 dictionary work? What is the data structure behind it. If we type '4663' we get 'good' when we press down button we get 'gone' then 'home' etc...
EDIT: If the user types in 46 then it should show 'go' and when pressed down arrow should show 'gone' etc...
...
Hi,
Could someone please explain to me the difference between B Trees and 2-3-4 Trees?
And also how would you find the maximum and minimum height of each?
Thanks
...
I am doing a project in which I require btree or b+tree data structure. Does anyone know of an existing implementation of btree or b+tree (with insert, delete, search algorithms)? It should accept string as input and form btree or b+tree of these string.
...
I want to make a generic BST, that can be made up of any data type, but i'm not sure how I could add things to the tree, if my BST is generic. All of my needed code is below. I want my BST made up of Locations, and sorted by the x variable. Any help is appreciated.
Major thanks for looking.
public void add(E element)
{
if (root == ...
I have lists of variable length where each item can be one of four unique, that I need to use as keys for another object in a map. Assume that each value can be either 0, 1, 2 or 3 (it's not integer in my real code, but a lot easier to explain this way) so a few examples of key lists could be:
[1, 0, 2, 3]
[3, 2, 1]
[1, 0, 0, 1, 1, 3]
[...
I need to use a function on a vector that does not take a ts object. I'm trying to convert it to a plain old vector but I just can't seem to figure it out. I googled around but mostly people are trying to convert data types into ts object. I want to go the other way. Any help would be appreciated.
...
How to convert a binary tree to binary search tree in-place, i.e., we cannot use any extra space.
...
I've started working on a little ruby project that will have sample implementations of a number of different data structures and algorithms. Right now it's just for me to refresh on stuff I haven't done for a while, but I'm hoping to have it set up kind of like Ruby Koans, with a bunch of unit tests written for the data structures but t...
A Binary Decision Diagram (BDD) is a data structure to represent boolean functions. I'd like use this data structure in a Java program. My search for Java based BDD libraries resulted into the following packages.
JavaBDD
JDD
JBDD
If you know of any other BDD libraries available for Java programs, please let me know so that I add it t...
I'm going to implement a points-to analysis algorithm. I'd like to implement this analysis mainly based on the algorithm by Whaley and Lam. Whaley and Lam use a BDD based implementation of Datalog to represent and compute the points-to analysis relations.
The following lists some of the relations that are used in a typical points-to ana...
Ok, so I have my basic linked Queue class with basic functions such as front(), empty() etc.. and I have transformed it into a template. Now, I also have a class called Student. Which holds 2 values: Student name and Student Id. I can print out a student with the following code..
Student me("My Name", 2);
cout << me << endl;
Here is ...
Hello,
How do we model these objects ?
Scenario 1: Price changes in a time period
EffectiveDate ExpiryDate Price
2009-01-01 2009-01-31 800$
2009-02-01 Null 900$
So, if the price changes to 910$ on 2009-02-15, then the system should automatically update the expiry date on the previous effective price to 2009-0...
Hi,
I am looking into alternate ways to do a Matrix Multiplication. Instead of storing my matrix as a two-dimensional array, I am using a vector such as
vector<pair<pair<int,int >,int > >
to store my matrix. The pair within my pair (pair) stores my indices (i,j) and the other int stores the value for the given (i,j) pair. I thought...
Hello.
I am currently working hard at a long overdue assignment.
I am supposed to make a linked list using generics. Or, I have an interface called Creature that the list is supposed to sort. But how? How can the list sort creatures when the interface cant have a Creature nextCreature pointer? I know of to make a linked list using norma...
I've got multiple structures to maintain in my application. All link to the same records, and one of them could be considered the "master" in that it reflects actual relationships held in files on disk. The other structures are used to "call out" elements of the main design for purchase and work orders. I'm struggling to come up with ...
I have a set of N items, which are sets of integers, let's assume it's ordered and call it I[1..N]. Given a candidate set, I need to find the subset of I which have non-empty intersections with the candidate.
So, for example, if:
I = [{1,2}, {2,3}, {4,5}]
I'm looking to define valid_items(items, candidate), such that:
valid_items(I,...
My professor provided me with a file called CursorList.cpp that implements a "Cursor Linked List". The problem is - I have no idea what that even is!
Could anybody give me the gist of it?
Thanks!
...
Hi,
Say you have a DB table with two cols: SearchPhrase(String) | Popularity(Int).
You need to initialize a DS so that you could use it to implement an autocomplete
feature (like google suggest) comfortably. The requirement: Once the data from the db
is processed into the data structure, when you type a letter you get the 10 most popul...
I want to write an application that needs a Tasks queue. I should be able to add Tasks into this queue and these tasks can finish asynchronously (and should be removable from this queue, once they are complete)
The datastructure should also make it possible to get the information about any task within the Queue, provided a unique queue...
Suppose you want to have something like variadic templates (the ability to define n type parameters for a generic class) in Scala.
For example you do not want to define Tuple2[+T1, +T2] and Tuple3[+T1, +T2, +T3] but Tuple[T*].
Are there other options than HLists that would support Tuple, Product and Function?
...