MCPcopy Index your code
hub / github.com/loiane/javascript-datastructures-algorithms

github.com/loiane/javascript-datastructures-algorithms @main sqlite

repository ↗ · DeepWiki ↗
817 symbols 1,768 edges 177 files 141 documented · 17%
README

Learning JavaScript Data Structures and Algorithms

Project Structure

You can find the source code organized by chapter under the src folder.

Each file has the .js and the .ts extension, so you get both the JavaScript and the Typescript versions of the source code.

Each data structure and algorithm from parts 2 and 3 also have a _test_ folder where you can find the respective Jest test cases.

How to use this repository

Install all dependencies

npm install

Run all tests

npm test

Run a particular example

cd src/01-intro
node 01-hello-variables.js

or:

node src/01-intro/01-hello-variables.js

💻 Tecnologies

  • JavaScript
  • TypeScript
  • Jest (tests)

Happy Coding!

Extension points exported contracts — how you extend this code

Comparable (Interface)
(no doc) [1 implementers]
src/01-intro/08-typescript.ts
User (Interface)
(no doc)
src/03-array/13-remove-duplicates.ts
EditorAction (Interface)
(no doc)
src/04-stack/01-using-stack-class.ts
Friend (Interface)
(no doc)
src/01-intro/08-typescript.ts
Friend (Interface)
(no doc)
src/03-array/04-searching-sorting.ts
Friend (Interface)
(no doc)
src/03-array/09-arrays-typescript.ts

Core symbols most depended-on inside this repo

append
called by 120
src/06-linked-list/linked-list.ts
insert
called by 108
src/10-tree/avl-tree.js
push
called by 106
src/04-stack/stack.ts
addEdge
called by 82
src/13-graph/graph.js
forEach
called by 65
src/06-linked-list/linked-list_.js
toString
called by 47
src/06-linked-list/linked-list.ts
get
called by 46
src/08-dictionary-hash/hash-table.js
add
called by 33
src/07-set/set.ts

Shape

Method 465
Function 186
Class 158
Interface 6
Enum 2

Languages

TypeScript100%

Modules by API surface

src/10-tree/binary-search-tree.ts23 symbols
src/10-tree/binary-search-tree.js23 symbols
src/06-linked-list/doubly-linked-list_.js22 symbols
src/06-linked-list/linked-list_.js21 symbols
src/10-tree/red-black-tree.ts19 symbols
src/10-tree/red-black-tree.js19 symbols
src/10-tree/avl-tree.ts19 symbols
src/10-tree/avl-tree.js19 symbols
src/06-linked-list/doubly-linked-list.ts19 symbols
src/06-linked-list/circular-linked-list_.js19 symbols
src/06-linked-list/linked-list.ts18 symbols
src/06-linked-list/circular-linked-list.ts18 symbols

Dependencies from manifests, versioned

@jest/globals30.4.1 · 1×
@types/node26.0.1 · 1×
jest30.4.2 · 1×
ts-jest29.4.11 · 1×
ts-node10.9.2 · 1×
typescript6.0.3 · 1×

For agents

$ claude mcp add javascript-datastructures-algorithms \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact