Binary tree based custom data storage class

Completed Posted Jan 4, 2013 Paid on delivery
Completed Paid on delivery

Develop in Delphi 2010 (or other compatible version of Delphi), a custom data storage class that is used to store pieces of data that basically consists of two strings and a boolean value. The class will be used in a time critical section of a Windows application, so it must be built for speed. Because of this, use a sorted binary tree for the data structure. Memory consumption is not an issue.

Procedure AddData(const Key, SubStr : String; const bVal : Boolean);

Procedure GetData(const Key : String; const bVal : Boolean; var List : TStringList);

Procedure RemoveData(const Key : String);

Procedure CountBvals(const : Key, SubStr : String; var bValTrue : Integer; var bValFalse : Integer); overload;

Procedure CountBvals(const : Key: String; var bValTrue : Integer; var bValFalse : Integer); overload;

Procedure Clear;

AddData() is used to add data to the data structure. Each piece of data that is stored consists of a Key and a SubStr, together these two strings are unique, i.e. no two pieces of data can exist in the data structure with the same Key+SubStr. Neither is case sensitive. The AddData() must verify the added data is not duplicate, i.e. already existing in the data storage.

GetData() is used to list all the stored SubStr values of the given Key with the given bVal value. The result list cannon contain duplicate lines. The result list can be sorted or not. The result SubStr's are not case sensitive.

RemoveData() removes all data from the data structure whose Key is the given. The Key is not case sensitive.

CountBvals() calculates the number of items stored with the given Key and checks how many of these items have a bVal of True and how many has a bVal of False and returns these numbers via the var parameters.

The class will be used typically like this:

For i := 1 to 100000 do

begin

For j := 1 to (1..20) do AddData();

CountBvals(Key, x, y);

...

RemoveData(Key);

End;

Clear();

As you can see, the data storage usually contains 1..20 pieces of data with the same Key, then CountBvals is called and then the data is removed from the class.

Please only bid if you have experience with speed optimized data structures such as binary trees and can start to work on this right away. The final delivery must consist of the class stored in a separate pas file and a simple demo application that can be used to add data to the class and to verify the class works.

Algorithm Delphi

Project ID: #4095178

About the project

7 proposals Remote project Active Jan 5, 2013

Awarded to:

Yuri2012

Dear sirs, I have experience programming for over 18 years. Ready to perform your job quickly, efficiently and on time. With respect Yuri

$100 USD in 5 days
(1 Review)
2.0

7 freelancers are bidding on average $188 for this job

qspsolutions

Hi again, here is my bid. More details in PMB.

$350 USD in 10 days
(34 Reviews)
6.0
gyk

Hello, I hope I can create this quickly.

$165 USD in 4 days
(21 Reviews)
5.8
winnet21

Hi, I have experience with this project, I happily if work with you in this project. Best Regards

$180 USD in 10 days
(17 Reviews)
5.2
vladang

Hello sir. I can do your job. If you need serious man, who can start right now, then I am perfect choice. regards vladang

$120 USD in 6 days
(4 Reviews)
3.3
eugene2006

Hi. I interested in your project. More questions in private Message Board.

$200 USD in 5 days
(2 Reviews)
2.2
ECO123MWNS

I have more years expirence, see my profile FXTrader, CAD software projects in Delphi

$199 USD in 30 days
(0 Reviews)
0.0