Ad

javascript-algorithms: JavaScript algorithms and data structures

javascript-algorithms provides implementations of fundamental algorithms and data structures in JavaScript with detailed explanations and supplementary resources for interview preparation.
Screenshot of trekhleb/javascript-algorithms homepage

javascript-algorithms is a comprehensive collection of JavaScript implementations for common algorithms and data structures. This repository aims to provide a practical resource for understanding and applying these fundamental concepts, particularly relevant for technical interviews. The emphasis is on clear, concise code with accompanying explanations and links to further learning materials.

The project offers a wide range of algorithms and data structures, categorized by difficulty level (Beginner/Advanced). Each algorithm/data structure has its own dedicated README file with explanations and links. The structure includes implementations for mathematical algorithms, sets, and string algorithms, providing comprehensive coverage. It also supports multiple languages through documentation translation.

  • Data Structures: Includes implementations for linked lists, trees (binary search trees, AVL trees, Red-Black trees, segment trees, Fenwick trees), graphs, disjoint sets, Bloom filters, and LRU caches.
  • Math Algorithms: Contains implementations for various mathematical algorithms like bit manipulation, prime factorization, Fibonacci numbers, and matrix operations.
  • Set Algorithms: Covers algorithms for sets like Cartesian product, permutations, combinations, and longest common subsequence.
  • String Algorithms: Offers implementations for string-related algorithms such as Hamming distance, palindrome checks, and string matching algorithms like Knuth-Morris-Pratt (KMP) and Rabin-Karp.
  • Search Algorithms: Includes implementations of linear search and jump search.
  • Sorting Algorithms: The repository includes sorting algorithms such as bubble sort, insertion sort, merge sort, quicksort, heapsort, and radix sort.
  • Dynamic Programming: Provides implementations of classic dynamic programming problems like Fibonacci sequence and knapsack problem.

The project is actively maintained with frequent updates and contributions, as indicated by recent commits and issue resolution. Comprehensive documentation is available, and the project has a significant number of stars and forks, indicating community interest. The CI/CD pipeline is functional, ensuring code quality and reliability.

This repository is valuable for developers, students, and anyone preparing for technical interviews. It offers readily usable JavaScript implementations of essential algorithms and data structures, coupled with clear explanations to facilitate understanding. It provides a practical alternative to solely relying on theoretical knowledge by allowing users to immediately apply algorithms through working code.

Languages:
Summarize:
Share:
Stars
196,191
Forks
31,051
Issues
403
Created
8 years ago
Commit
26 days ago
License
MIT
Archived
No
Updated 16 days ago

Similar Repositories