Algorithms
8 articles
Breadth-First Algorithm
Learn how to implement Breadth-First Search in JavaScript with a complete working example. This guide covers graph representation as an adjacency list and step-by-step BFS traversal logic.
Depth First Search Algorithm (DFS)
Depth First Search is a graph traversal algorithm that explores as far as possible along each branch before backtracking. This article covers a recursive JavaScript implementation, time/space complexity analysis, and practical comparisons with BFS.
Dijkstra's Algorithm
Dijkstra's algorithm finds the shortest path between nodes in a weighted graph. This article includes a complete JavaScript implementation with a worked example.
Fetching Metadata from Youtube API
A guide to retrieving video metadata from YouTube using the Google API client library, with JavaScript code examples for both bulk and individual video queries.
Fibonacci with LRUCache
Learn how to optimize recursive Fibonacci calculations using an LRUCache to cache previously computed results, reducing redundant computations and improving performance.
Least Recently Used Algorithm (LRU)
The Least Recently Used (LRU) cache algorithm efficiently manages a limited number of cached items by removing the least recently accessed item when space is needed. This article demonstrates how to implement an LRU cache using a LinkedList data structure in JavaScript.
N-Queens Problem
The N-Queens problem is a classic algorithm challenge where you must place n queens on an n×n chessboard so no two queens threaten each other. This article explores backtracking solutions with working JavaScript implementations.
RSA Algorithm
A complete JavaScript implementation of the RSA algorithm, including functions to generate public-private key pairs, encrypt messages with the public key, and decrypt ciphers with the private key.