Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
/ KeyArray Public

High-performance C++ data structure for fast key-based access with guaranteed O(1) operations, dynamic resizing, and memory-efficient design

Notifications You must be signed in to change notification settings

Zyhco/KeyArray

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KeyArray 🚀

KeyArray

Welcome to KeyArray, a high-performance C++ data structure designed for fast key-based access. With guaranteed O(1) operations, dynamic resizing, and a memory-efficient design, KeyArray is perfect for applications that require quick access to data.

Table of Contents

Features 🌟

  • Fast Access: Achieve O(1) access time for key-based lookups.
  • Dynamic Resizing: Automatically resize the array to accommodate more data without performance loss.
  • Memory Efficient: Optimized for low memory usage while maintaining speed.
  • Open Source: Free to use and modify under the MIT License.
  • Cross-Platform: Works on various operating systems.

Installation ⚙️

To get started with KeyArray, you need to clone the repository and include the necessary files in your project.

git clone https://github.com/Zyhco/KeyArray.git

After cloning, navigate to the project directory and include the header file in your C++ project.

#include "KeyArray.h"

Usage 📚

Using KeyArray is straightforward. Below is a simple example to demonstrate how to use this data structure.

Example

#include "KeyArray.h"
#include <iostream>

int main() {
    KeyArray<int, std::string> myArray;

    myArray.insert(1, "Apple");
    myArray.insert(2, "Banana");

    std::cout << "Key 1: " << myArray.get(1) << std::endl;
    std::cout << "Key 2: " << myArray.get(2) << std::endl;

    return 0;
}

Key Methods

  • insert(key, value): Adds a key-value pair to the array.
  • get(key): Retrieves the value associated with the given key.
  • remove(key): Deletes the key-value pair from the array.

Contributing 🤝

We welcome contributions to improve KeyArray. If you have suggestions or bug fixes, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or fix.
  3. Commit your changes.
  4. Push your branch and create a pull request.

Please ensure that your code adheres to the existing style and includes appropriate tests.

License 📜

KeyArray is licensed under the MIT License. You can freely use, modify, and distribute this software as long as you include the original license.

Releases 📦

For the latest releases and updates, please visit our Releases section. Here, you can download the latest version and view the changelog.

Contact 📧

For questions or suggestions, feel free to reach out:

Thank you for your interest in KeyArray! We hope it helps you in your projects.

About

High-performance C++ data structure for fast key-based access with guaranteed O(1) operations, dynamic resizing, and memory-efficient design

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.