/ts-algos

Primary LanguageTypeScript

Data Structures & Algorithms with Typescript

This repository contains implementations of some of the most common Data structures and algorithms with typescript, useful for interview preparations, personal interest and anything in-between.

Topics

Complexity analysis

  • Big O
  • Time & space complexity

Data Structures

  • Arrays
  • Hash Tables
  • Singly Linked List
  • Doubly Linked List
  • Trees
  • Stacks
  • Queues
  • Graphs (WIP)

Algorithms (WIP)

  • Recursion
  • Sorting
    • Bubble Sort
    • Selection Sort
    • Insertion Sort
    • Merge Sort
    • Quick sort
  • Searching
    • Linear Search
    • Binary Search
    • Quick Select
    • Breadth First Search (BFS)

Problem Solving Patterns

  • WIP

Interview questions and solutions

Some example problems are in the src/playground directory, they'll be there for now, until there's more time to create a separate section for it.

Setting up

  • You'd need to have node js installed
  • Install Typescript globally via npm npm install -g typescript
  • Clone repo and install dependencies npm install
  • Run files individually e.g tsc && node dist/algorithms/sorting/merge-sort/merge_sort.js

Resources