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

https://github.com/behzadam/algorithms

This repository is a collection of TypeScript algorithms and data structures.
https://github.com/behzadam/algorithms

algorithm algorithms algorithms-and-data-structures data-structures javascript-algorithms patterns search-algorithm sorting-algorithms typescript

Last synced: 6 months ago
JSON representation

This repository is a collection of TypeScript algorithms and data structures.

Awesome Lists containing this project

README

          

# TypeScript Algorithms and Data Structures

This repository is a collection of TypeScript algorithms and data structures. It is intended for educational purposes and serves as a reference for developers who want to learn and practice TypeScript.

![GitHub top language](https://img.shields.io/github/languages/top/behzadam/algorithms)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/b6d0142c6cb448e28ea0dcc88d77b062)](https://app.codacy.com/gh/behzadam/algorithms/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
![Lines of code](https://img.shields.io/tokei/lines/github/behzadam/algorithms)

## Introduction

It includes code and patterns from the "JavaScript Algorithms" repository, translated from JavaScript to TypeScript. [JavaScript Algorithms](https://github.com/trekhleb/javascript-algorithms)

## Data structure

- [HashTable](src/data-structure/hash-table/hash-table.ts)
- [MinHeap](src/data-structure/heap/min-heap.ts)
- [MaxHeap](src/data-structure/heap/max-heap.ts)
- [LinkedList](src/data-structure/linked-list/linked-list.ts)
- [Queue](src/data-structure/queue/queue.ts)
- [Stack](src/data-structure/stack/stack.ts)
- [MaxPriorityQueue](src/data-structure/priority-queue/max-priority-queue.ts)
- [MinPriorityQueue](src/data-structure/priority-queue/min-priority-queue.ts)
- [Trie](src/data-structure/trie/trie.ts)

## Algorithms

### Search

- [BinarySearch](src/algorithms/search/binary-search/binary-search.ts)
- [LinearSearch](src/algorithms/search/linear-search/linear-search.ts)

### Sort

- [QuickSort](src/algorithms/sort/quick-sort/quick-sort.ts)
- [BubbleSort](src/algorithms/sort/bubble-sort/bubble-sort.ts)
- [BubbleSortSimple](src/algorithms/sort/bubble-sort/bubble-sort-simple.ts)

## Utils

- [Comparator](src/ds/comparator/comparator.ts)

Please note that the repository is still a work in progress, and new algorithms and patterns will be added over time.

## Getting Started

To get started with the repository, follow these simple steps:

Clone the repository to your local machine using the command:

```bash
git clone https://github.com/behzadam/algorithms.git
```

Install the required dependencies by running the following command:

```bash
pnpm install
```

Run all tests

```bash
pnpm test
```

Format checking

```bash
pnpm format:check
```

Format fixing

```bash
pnpm format:fix
```

Run ESLint

```bash
pnpm lint
```

## License

The "TypeScript Algorithms, Data Structures and Patterns" repository is licensed under the [MIT License](https://opensource.org/licenses/MIT). Feel free to use, modify, and distribute the code as per the terms of the license.

## Contact

If you have any questions or suggestions regarding the repository, please feel free to [contact me](mailto:behzad.am@gmail.com).