Giter VIP home page Giter VIP logo

projecthashmap's Introduction

Hash Map

Introduction

This project is part of The Odin Project and it focuses on implementing a basic hash map data structure in JavaScript.
A hash map, also known as a hash table, is a fundamental data structure used in computer science to efficiently store and retrieve key-value pairs. This project serves as a foundational exercise in understanding hash map and their operations, providing practical experience in implementing and using this important data structure.

Features

  • Set: Add a key-value pair to the hash map.
  • Get: Retrieve the values associated with a given key.
  • Has: Check if a key exists in the hash map.
  • Remove: Remove a key-value pair from the hash map.
  • Keys: Return an array containing all the keys in the hash map.
  • Values: Return an array containing all the values in the hash map.
  • Entries: Return an array containing all the key-value pairs in the hash map as nested arrays.
  • Length: Return the number of key-value pairs stored in the hash map.
  • Clear: Remove all entries form the hash map.

Technologies Used

  • JavaScript (ES6)
  • Node.js (for running JavaScript code)

Usage

To get started with the Hash Map project, follow these steps:

  1. Clone the repository to your local machine using the following command:
    git clone [email protected]:ExtF8/projectHashMap.git
    
  2. Navigate to the project directory:
    cd projectHashMap
    
  3. Running Tests:
  • The script.js file contains test cases for the Hash Map implementation.
  • To run the tests, use the following command:
    npm run start
    
  • This command will execute the test script and display the results in the console.
  • You can modify the script.js file to add or customize test cases as needed.

projecthashmap's People

Contributors

extf8 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.