An open API service indexing awesome lists of open source software.

https://github.com/gotz1480/binary-search-tree

BST (binary search tree) implementation in Go
https://github.com/gotz1480/binary-search-tree

Last synced: 6 months ago
JSON representation

BST (binary search tree) implementation in Go

Awesome Lists containing this project

README

          

# BST (binary search tree) implementation in Go

This repository contains a simple user management system implemented using a Binary Search Tree (BST) in Go. It showcases how BSTs can be utilized for efficient data storage and retrieval, focusing on managing user information by unique IDs.

## Introduction

The project demonstrates a basic implementation of a Binary Search Tree to manage user data. Each user is identified by a unique ID and has associated information, such as a name. The BST allows for efficient insertion and search operations based on the user ID.

## Features

- Insertion of new user records into the BST.
- Searching for users by their unique ID.
- Simple and efficient data structure for user management.

## Getting Started

### Prerequisites

- Go (Golang) installed on your machine. Visit [Go's official website](https://golang.org/dl/) for download and installation instructions.

### Running the Code

1. Clone the repository to your local machine.
2. Navigate to the directory containing the code.
3. Run the program using the Go command:
```sh
go run main.go
```

This will execute the main program, which includes inserting several users into the BST and searching for specific users by ID.

## Example Output

```
User found: &{ID:50 Name:Jane Smith}
User not found
```

## Contributing

Contributions are welcome! If you have suggestions for improving this project, please feel free to fork the repository and submit a pull request.

## License

This project is open source and available under the [MIT License](LICENSE).