Find Jobs
Hire Freelancers

Delphi: Balanced binary tree control

$30-250 USD

W trakcie realizacji
Opublikowano prawie 5 lat temu

$30-250 USD

Płatne przy odbiorze
Implement in Delphi 10.3 (or compatible) two non visual data structure controls called TBinaryKeySearch and TBinaryKeyValueSearch. These two controls are balanced binary search trees. The controls are identical other than TBinaryKeyValueSearch contains name = value pairs, i.e. each node contains a key just like TBinaryKeySearch but also each key contains a string value. TBinaryKeySearch must have these methods: 0) Constructor Create(CaseSensitive : Boolean = False); - Creates an instance of the structure. If the given CaseSensitive is False, all Key comparisons of the control must be done as not case sensitive. Note: You can implement this simply by converting all Keys to LowerCase(). 1) Function Add(const Key : String) : Boolean; - Returns true if Key was added. Key is not added if key is empty string or if key already exists in the structure. 2) Function Query(const Key : String) : Boolean; - Returns true if Key exists in the structure. 3) Procedure Clear; - Clears the structure. 4) Function Remove(const Key : String) : Boolean; - Removes the given Key. Returns true if the Key was removed. Key is not removed if it does not exist in the structure. 5) Procedure SaveToFile(const Filename : String); - Saves the structure to a text file in human readable format. For example, one key per line. 6) Procedure SerializeToFile(const Filename : String); - Saves the structure to a file. 7) Procedure SerializeFromFile(const Filename : String); - Loads the structure from a file generated by an earlier SerializeToFile() call. 8) Procedure SelfTest(); - Perform a random number of the above methods and verify with assert() they work correctly. For example, add key "foobar" and after verify Query confirms "foobar" exists. The method must test all methods except SaveToFile() TBinaryKeyValueSearch must have these methods: 0) Constructor Create(CaseSensitive : Boolean = False); - Creates an instance of the structure. If the given CaseSensitive is False, all Key comparisons of the control must be done as not case sensitive. Note: You can implement this simply by converting all Keys to LowerCase(). This does not affect the Values in any ways, i.e. do not convert them lower case. 1) Function Add(const Key, Value : String) : Boolean; - Returns true if Key Value pair was added. Key is not added if key is empty string. If Key already exists in the structure, its value is updated with the given Value. Note: Value can be empty. 2) Function Query(const Key : String; Var Value : String) : Boolean; - Returns true if Key exists in the structure and returns the Value of the key via Value. 3) Procedure Clear; - Clears the structure. 4) Function Remove(const Key : String) : Boolean; - Removes the given Key. Returns true if the Key was removed. Key is not removed if it does not exist in the structure. 5) Procedure SaveToFile(const Filename : String); - Saves the structure to a text file in human readable format. For example, in format of "Key => Value", one pair per line. 6) Procedure SerializeToFile(const Filename : String); - Saves the structure to a file. 7) Procedure SerializeFromFile(const Filename : String); - Loads the structure from a file generated by an earlier SerializeToFile() call. 8) Procedure SelfTest(); - Perform a random number of the above methods and verify with assert() they work correctly. For example, add key "foobar" and after verify Query confirms "foobar" exists. The method must test all methods except SaveToFile() These controls are used mainly with the Add() and Query() methods and expected data is under 200 000 rows of data with average Key (and Value) lengths of 200 characters. The Remove() is rarely used. You can use any existing ready made code as a base of this work. Googling "Delphi balanced binary tree" shows up many cases of sample code.
Identyfikator projektu: 19730318

Informację o projekcie

4 ofert
Zdalny projekt
Aktywny 5 lat temu

Szukasz sposobu na zarobienie pieniędzy?

Korzyści ze składania ofert na Freelancer.com

Ustal budżet i ramy czasowe
Otrzymuj wynagrodzenie za swoją pracę
Przedstaw swoją propozycję
Rejestracja i składanie ofert jest bezpłatne
Przyznano:
Awatar Użytkownika
Hi, I'm not that verse in Delphi but have messed with it in the past and it is similar to many other programming languages in my repertoire. I am familiar with key search algorithms and have reference text and as you said Google is always an option. I'd like to know your project timeline. Please send me a private message I can't respond until you send me a message.
$111 USD w 4 dni
0,0 (0 opinii)
0,0
0,0
4 freelancerzy składają oferty o średniej wysokości $150 USD dla tej pracy
Awatar Użytkownika
hi, i can do this project, but need know what you want inheritance from Component or simple Object? TBinaryKeySearch = class(TComponent) or TBinaryKeySearch=class(TObject)? or you want use generics like: TBinaryKeySearch<TKey>?
$250 USD w 7 dni
5,0 (19 opinii)
4,9
4,9
Awatar Użytkownika
Hello. You need binary tree pascal code write. Is small task for my I coded delphi from 1998 I have hi degree in information system in economics. Pay only full complete
$99 USD w 3 dni
4,9 (15 opinii)
3,6
3,6
Awatar Użytkownika
Hi, High talented Delphi, MatLab, Unity, VBA, Access, Microsoft Office, Java, Python and R, C#, C++, QT expert is here! I have graduated from National University of Singapore and received Master Degree there. As I am a professional Delphi, Python and C# developer, I can do your job perfectly Fast and Perfectly on time. I have 10+ years of experience for Delphi, Python, R, C#, C++ application Development. I have developed several dozens of applications such as OCR, AI, e-commerce, banking, UNESCO census. I understood what you want and want to like to discuss in more detail for your project. I sincerely hope to work with you. If you hire me and give me a chance to prove my abilities, I will give you the best results with my professional skills and will do my best to finish the project successfully. I am sure I can help you. Please see my profile. I am looking forward to your soon reply. Best regards.
$140 USD w 7 dni
5,0 (1 opinia)
1,8
1,8

O kliencie

Flaga THAILAND
Turku, Thailand
5,0
621
Zweryfikowana metoda płatności
Członek od mar 16, 2011

Weryfikacja Klienta

Dziękujemy! Przesłaliśmy Ci e-mailem link do odebrania darmowego bonusu.
Coś poszło nie tak podczas wysyłania wiadomości e-mail. Proszę spróbować ponownie.
Zarejestrowani Użytkownicy Całkowita Liczba Opublikowanych Projektów
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Wczytywanie podglądu
Udzielono pozwolenia na Geolokalizację.
Twoja sesja logowania wygasła i zostałeś wylogowany. Proszę, zalogować się ponownie.