Skip to content

RajatSharan/JavaScript-Algorithms-and-Data-Structures

Repository files navigation

JavaScript Algorithms and Data Structures

This repository contains a collection of algorithms and data structures implemented in JavaScript. It is designed to help developers and students learn and practice fundamental concepts of computer science.

Table of Contents

Introduction

Algorithms and data structures are the building blocks of computer science. Understanding them is essential for solving problems efficiently. This repository aims to provide clear and concise implementations of common algorithms and data structures in JavaScript.

Features

  • Comprehensive implementations of algorithms and data structures
  • Well-commented and easy-to-follow code
  • Test cases to validate each implementation
  • Suitable for beginners and experienced developers

Getting Started

Prerequisites

Make sure you have the following installed on your system:

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/JavaScript-Algorithms-and-Data-Structures.git
  2. Navigate to the project directory:

    cd JavaScript-Algorithms-and-Data-Structures
  3. Install dependencies:

    npm install

Folder Structure

JavaScript-Algorithms-and-Data-Structures/
├── algorithms/          # Algorithm implementations
├── data-structures/     # Data structure implementations
├── tests/               # Unit tests
├── README.md            # Project documentation
└── package.json         # Project metadata and dependencies

Algorithms

The algorithms/ folder includes implementations of various algorithms categorized as:

  • Sorting (e.g., Bubble Sort, Merge Sort, Quick Sort)
  • Searching (e.g., Binary Search, Linear Search)
  • Graph Algorithms (e.g., BFS, DFS, Dijkstra's Algorithm)
  • String Manipulation (e.g., Pattern Matching, Palindrome Check)
  • Others (e.g., Recursion, Dynamic Programming)

Data Structures

The data-structures/ folder includes:

  • Arrays
  • Linked Lists (Singly and Doubly Linked Lists)
  • Stacks
  • Queues
  • Trees (Binary Search Tree, AVL Tree)
  • Graphs
  • Hash Tables

Contributing

Contributions are welcome! If you would like to contribute, please follow these steps:

  1. Fork the repository.

  2. Create a new branch for your feature or bugfix:

    git checkout -b my-feature-branch
  3. Make your changes and commit them:

    git commit -m "Add a new algorithm"
  4. Push to your fork:

    git push origin my-feature-branch
  5. Open a pull request.

About

JavaScript Algorithms and Data Structures

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published