Find Jobs
Hire Freelancers

Delphi: Balanced binary tree control

$30-250 USD

En curso
Publicado hace casi 5 años

$30-250 USD

Pagado a la entrega
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.
ID del proyecto: 19730318

Información sobre el proyecto

4 propuestas
Proyecto remoto
Activo hace 5 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
Adjudicado a:
Avatar del usuario
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 en 4 días
0,0 (0 comentarios)
0,0
0,0
4 freelancers están ofertando un promedio de $150 USD por este trabajo
Avatar del usuario
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 en 7 días
5,0 (19 comentarios)
4,9
4,9
Avatar del usuario
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 en 3 días
4,9 (15 comentarios)
3,6
3,6
Avatar del usuario
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 en 7 días
5,0 (1 comentario)
1,8
1,8

Sobre este cliente

Bandera de THAILAND
Turku, Thailand
5,0
621
Forma de pago verificada
Miembro desde mar 16, 2011

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.