Skip to content

Hashir15432/learn-algorithm-in-js

Repository files navigation

Algorithms in JavaScript

Welcome to the Algorithms in JavaScript repository!
This repo contains clean and well-documented implementations of fundamental and advanced algorithms using modern JavaScript (ES6+). A helpful resource for coding interview preparation, competitive programming, or deepening your understanding of algorithms.


📖 Table of Contents


About the Repo

This repository contains implementation of algorithms categorized by type. Each algorithm file includes:

  • Problem Description
  • Time and Space Complexity
  • JavaScript Implementation
  • Sample Input/Output

Algorithms Covered

Searching Algorithms

  • Linear Search
  • Binary Search
  • Interpolation Search

Sorting Algorithms

  • Bubble Sort
  • Selection Sort
  • Insertion Sort
  • Merge Sort
  • Quick Sort
  • Heap Sort

Recursion and Divide & Conquer

  • Tower of Hanoi
  • Fibonacci Sequence
  • Binary Search (recursive)

Dynamic Programming

  • Climbing Stairs
  • Longest Common Subsequence
  • 0/1 Knapsack Problem

Graph Algorithms

  • Breadth-First Search (BFS)
  • Depth-First Search (DFS)
  • Dijkstra’s Algorithm

Greedy Algorithms

  • Activity Selection
  • Huffman Coding

More algorithms will be added regularly.



Getting Started

# Clone the repository
git clone https://github.com/your-username/algorithms-js.git

# Navigate into the directory
cd algorithms-js

# Run a file using Node.js
node folder_name/file_name.js


If this repo helps you, don’t forget to star it and share it!

---

Would you like me to personalize this with your GitHub repo name or add more example code blocks?

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published