Skip to content

jayinmt/algorithms-and-data-structures

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

TypeScript Data Structures and Algorithms

This repository contains implementations of various data structures and algorithms in TypeScript. The code serves as a reference and learning resource for developers interested in understanding and applying these concepts in their projects.

Table of Contents

Introduction

The purpose of this repository is to provide clear and concise implementations of common data structures and algorithms using TypeScript. By exploring the code, developers can gain insights into how these fundamental concepts can be implemented and utilized in real-world scenarios.

Data Structures

The following data structures are implemented in this repository:

  • Binary Search Tree
  • Trie (Prefix Tree)
  • LRU Cache

Each data structure is defined using TypeScript interfaces and classes, ensuring type safety and encapsulation.

Algorithms

The repository includes the following algorithm implementations:

  • Dijkstra's Shortest Path Algorithm

The algorithms are implemented as standalone functions, taking advantage of TypeScript's type system to ensure proper usage.

Design Patterns

The code also demonstrates the usage of design patterns to enhance code reusability and maintainability. The following design pattern is showcased:

  • Decorator Pattern

The Decorator pattern is applied to a simple Calculator class, logging the input arguments and results of the decorated method.

Usage

To use the code in this repository, follow these steps:

  1. Clone the repository: git clone https://github.com/jayinmt/algorithms-and-data-structures.git
  2. Install the necessary dependencies (if any).
  3. Explore the source code in the algorithms-and-data-structures.ts file.
  4. Modify and extend the code as per your requirements.
  5. Run the code using a TypeScript compiler or integrate it into your project.

Feel free to customize and build upon the provided implementations to suit your specific needs.

License

This project is licensed under the MIT License. See the LICENSE file for more information.

About

TypeScript: Algorithms and Data Structures.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published