diff --git a/LICENSE b/LICENSE index e0f48aea..dcc847b1 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2016 Adrian Mejia +Copyright (c) 2019 Adrian Mejia Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index d6706191..64c0d55a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,14 @@ +[![image](https://user-images.githubusercontent.com/418605/59557258-10742880-8fa3-11e9-84fb-4d66a9d89faa.png)](https://books.adrianmejia.com/dsajs-data-structures-algorithms-javascript/) + # Data Structures and Algorithms in JavaScript -![CircleCI](https://img.shields.io/circleci/build/github/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/master.svg) [![NPM version](https://badge.fury.io/js/dsa.js.svg)](https://badge.fury.io/js/dsa.js) [![Slack](https://dsajs-slackin.herokuapp.com/badge.svg)](https://dsajs-slackin.herokuapp.com) +[![CircleCI](https://img.shields.io/circleci/build/github/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/master.svg)](https://circleci.com/gh/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript) [![NPM version](https://badge.fury.io/js/dsa.js.svg)](https://badge.fury.io/js/dsa.js) [![Slack](https://dsajs-slackin.herokuapp.com/badge.svg)](https://dsajs-slackin.herokuapp.com) + +> This is the coding implementations of the [DSA.js book](https://books.adrianmejia.com/dsajs-data-structures-algorithms-javascript/) and the repo for the [npm package](https://www.npmjs.com/package/dsa.js). + +> In this repository, you can find the implementation of algorithms and data structures. They are implemented and explained in JavaScript. This material can be used as a reference manual for developers. You can refresh specific topics before an interview. Also, you can find ideas to solve problems more efficiently. + + -This repository covers the implementation of the classical algorithms and data structures in JavaScript. +[![Interactive Data Structures](https://user-images.githubusercontent.com/418605/46118890-ba721180-c1d6-11e8-82bc-6a671428b422.png)](https://embed.kumu.io/85f1a4de5fb8430a10a1bf9c5118e015) + + +## Table of Contents + + + + -## Usage +- [Installation](#installation) +- [Features](#features) +- [What's Inside](#whats-inside) + - [πŸ“ˆ Algorithms Analysis](#-algorithms-analysis) + - [πŸ₯ž Linear Data Structures](#-linear-data-structures) + - [🌲 Non-Linear Data Structures](#-non-linear-data-structures) + - [βš’ Algorithms Techniques](#%E2%9A%92-algorithms-techniques) +- [FAQ](#faq) +- [Support](#support) +- [Donations](#donations) +- [License](#license) +- [Book](#book) +- [Data Structures](#data-structures) + - [Linear Data Structures](#linear-data-structures) + - [Non-Linear Data Structures](#non-linear-data-structures) +- [Algorithms](#algorithms) + + + + +## Installation You can clone the repo or install the code from NPM: @@ -31,54 +66,257 @@ const { LinkedList, Queue, Stack } = require('dsa.js'); For a full list of all the exposed data structures and algorithms [see](https://github.com/amejiarosario/dsa.js/blob/master/src/index.js). -## Book -You can check out the [dsa.js book](https://books.adrianmejia.com) that goes deeper into each topic and provide additional illustrations and explanations. +## Features -- Algorithmic toolbox to avoid getting stuck while coding. -- Explains data structures similarities and differences. -- Algorithm analysis fundamentals (Big O notation, Time/Space complexity) and examples. -- Time/space complexity cheatsheet. +Algorithms are an essential toolbox for every programmer. -dsajs algorithms javascript book +You usually need algorithms when you have to sort data, search for a value, transform data, scale your code to many users just to name a few. +Algorithms are just the step you follow to solve a problem while data structures are where you store the data for later manipulation. Both combined create programs. - +> Algorithms + Data Structures = Programs. -## Data Structures +It's true that most programming languages and libraries provides implementations for basic data structures and algorithms. +However, to make use of data structures properly, you have to know the tradeoffs so you can choose the best tool for the job. -We are covering the following data structures. +This material is going to teach you to: -[![Interactive Data Structures](https://user-images.githubusercontent.com/418605/46118890-ba721180-c1d6-11e8-82bc-6a671428b422.png)](https://embed.kumu.io/85f1a4de5fb8430a10a1bf9c5118e015) +- πŸ›  Apply strategies to tackle algorithm questions. Never to get stuck again. Ace those interviews! +- βœ‚οΈ Construct efficient algorithms. Learn how to break down problems in manageable pieces. +- 🧠 Improve your problem-solving skills and become a stronger developer by understanding fundamental computer science concepts. +- πŸ€“ Cover essential topics, such as big O time, data structures, and must-know algorithms. Implement 10+ data structures from scratch. + +## What's Inside + +All the code and explanations are available on this repo. You can dig through the links and code examples from the ([src folder](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/tree/master/src)). However, the inline code examples are not expanded (because of Github's asciidoc limitations) but you can follow the path and see the implementation. + +_Note: If you prefer to consume the information in a more linear fashion then the [book format](https://books.adrianmejia.com/dsajs-data-structures-algorithms-javascript/) would be more appropriate for you._ + +The topics are divided in 4 main categories as you can see below: + +_(You can click on the ⯈ to expand the topics)_ + +### πŸ“ˆ [Algorithms Analysis](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/chapters/part1.adoc) + + + +
+ +
+ + Computer Science nuggets without all the mumbo-jumbo + + +--- + +### [Computer Science nuggets without all the mumbo-jumbo](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/chapters/algorithms-analysis.adoc) + +#### Learn to calculate run time from code examples + +![Translating lines of code to an approximate number of operations](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/raw/master/book/images/image4.png) + +--- + +
+ +
+ + Learn how to compare algorithms using Big O notation. + + +--- + +### [Learn how to compare algorithms using Big O notation.](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/chapters/big-o-examples.adoc#finding-duplicates-in-an-array-na%C3%AFve-approach) + +#### Comparing algorithms using Big O notation -### Linear Data Structures +Let's say you want to find the duplicates on an array. +Using Big O notation we can compare different implementations that do exactly the same but +they take different time to complete. -1. **Arrays**: Built-in in most languages so not implemented here. [Array Time complexity](https://github.com/amejiarosario/dsa.js/blob/master/book/chapters/array.adoc#array-complexity) +- [Optimal solution using a map](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/chapters/big-o-examples.adoc#linear-example) +- [Finding duplicates in an array (naΓ―ve approach)](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/chapters/big-o-examples.adoc#quadratic-example) + +--- + +
+ +
+ + 8 examples to explain with code how to calculate time complexity + + +--- + +[8 examples to explain with code how to calculate time complexity](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/chapters/big-o-examples.adoc#summary) + +#### Most common time complexities + +[![image](https://user-images.githubusercontent.com/418605/59617342-2a715080-90f4-11e9-9de9-9315fb0133f9.png)](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/chapters/big-o-examples.adoc#summary) + + + +#### Time complexity graph + +![Most common time complexities](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/raw/master/book/images/image5.png) + +--- + +
+
+ +### πŸ₯ž [Linear Data Structures](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/chapters/part2.adoc) + + + +
+ +
+ + Understand the ins and outs of the most common data structures. + + +--- + +#### [Understand the ins and outs of the most common data structures](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/chapters/part2.adoc) + + +- [Arrays](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/chapters/array.adoc): Built-in in most languages so not implemented here. [Array Time complexity](https://github.com/amejiarosario/dsa.js/blob/master/book/chapters/array.adoc#array-complexity) -2. **Linked Lists**: each data node has a link to the next (and +- [Linked List](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/chapters/linked-list.adoc): each data node has a link to the next (and previous). [Code](https://github.com/amejiarosario/dsa.js/blob/master/src/data-structures/linked-lists/linked-list.js) | [Linked List Time Complexity](https://github.com/amejiarosario/dsa.js/blob/master/book/chapters/linked-list.adoc#linked-list-complexity-vs-array-complexity) -3. **Queue**: data flows in a "first-in, first-out" (FIFO) manner. +- [Queue](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/chapters/queue.adoc): data flows in a "first-in, first-out" (FIFO) manner. [Code](https://github.com/amejiarosario/dsa.js/blob/master/src/data-structures/queues/queue.js) | [Queue Time Complexity](https://github.com/amejiarosario/dsa.js/blob/master/book/chapters/queue.adoc#queue-complexity) -4. **Stacks**: data flows in a "last-in, first-out" (LIFO) manner. +- [Stack](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/chapters/stack.adoc): data flows in a "last-in, first-out" (LIFO) manner. [Code](https://github.com/amejiarosario/dsa.js/blob/master/src/data-structures/stacks/stack.js) | [Stack Time Complexity](https://github.com/amejiarosario/dsa.js/blob/master/book/chapters/stack.adoc#stack-complexity) -### Non-Linear Data Structures +--- + +
+
+ + When to use an Array or Linked List. Know the tradeoffs. + + +--- + +#### [When to use an Array or Linked List. Know the tradeoffs](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/chapters/linear-data-structures-outro.adoc) + +Use Arrays when… +- You need to access data in random order fast (using an index). +- Your data is multi-dimensional (e.g., matrix, tensor). + +Use Linked Lists when: +- You will access your data sequentially. +- You want to save memory and only allocate memory as you need it. +- You want constant time to remove/add from extremes of the list. + +--- + +
+
+ + Build a List, Stack and a Queue. + + + --- + + #### [Build a List, Stack and a Queue from scratch](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/chapters/part2.adoc) + + Build any of these data structures from scratch: + - [Linked List](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/src/data-structures/linked-lists/linked-list.js) + - [Stack](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/src/data-structures/stacks/stack.js) + - [Queue](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/src/data-structures/queues/queue.js) + + --- + +
+
+ +### 🌲 [Non-Linear Data Structures](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/chapters/part3.adoc) + + + -1. **Trees**: data nodes has zero or more adjacent nodes a.k.a. +
+
+ + Understand one of the most versatile data structure of all: Maps + + +--- + +#### [HashMaps](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/chapters/map.adoc) + +Learn how to implement different types of Maps such as: +- [HashMap](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/chapters/map-hashmap.adoc) +- [TreeMap](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/chapters/map-treemap.adoc) + +Also, [learn the difference between the different Maps implementations](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/chapters/map-hashmap-vs-treemap.adoc): + +- `HashMap` is more time-efficient. A `TreeMap` is more space-efficient. +- `TreeMap` search complexity is *O(log n)*, while an optimized `HashMap` is *O(1)* on average. +- `HashMap`’s keys are in insertion order (or random depending in the implementation). `TreeMap`’s keys are always sorted. +- `TreeMap` offers some statistical data for free such as: get minimum, get maximum, median, find ranges of keys. `HashMap` doesn’t. +- `TreeMap` has a guarantee always an *O(log n)*, while `HashMap`s has an amortized time of *O(1)* but in the rare case of a rehash, it would take an *O(n)*. + +--- + +
+ +
+ + Know the properties of Graphs and Trees. + + +--- + +#### [Know the properties of Graphs and Trees](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/chapters/part3.adoc) + +##### [Graphs](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/chapters/graph.adoc) + +Know all the graphs properties with many images and illustrations. + +![graph example with USA airports](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/raw/master/book/images/image46.png) + + **Graphs**: data **nodes** that can have a connection or **edge** to + zero or more adjacent nodes. Unlike trees, nodes can have multiple + parents, loops. + [Code](https://github.com/amejiarosario/algorithms.js/blob/master/src/data-structures/graphs/graph.js) + | + [Graph Time Complexity](https://github.com/amejiarosario/dsa.js/blob/master/book/chapters/graph.adoc#graph-complexity) + +#### [Trees](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/chapters/tree.adoc) + +Learn all the different kinds of trees and its properties. + +![tree data structure properties](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/raw/master/book/images/image31.jpg) + +- **Trees**: data nodes has zero or more adjacent nodes a.k.a. children. Each node can only have one parent node otherwise is a graph not a tree. [Code](https://github.com/amejiarosario/algorithms.js/tree/master/src/data-structures/trees) @@ -86,60 +324,104 @@ We are covering the following data structures. [Docs](https://github.com/amejiarosario/dsa.js/blob/master/book/chapters/tree.adoc) - 1. **Binary Trees**: same as tree but only can have two children at + - **Binary Trees**: same as tree but only can have two children at most. [Code](https://github.com/amejiarosario/algorithms.js/tree/master/src/data-structures/trees) | [Docs](https://github.com/amejiarosario/dsa.js/blob/master/book/chapters/tree.adoc#binary-tree) - 2. **Binary Search Trees** (BST): same as binary tree, but the + - **Binary Search Trees** (BST): same as binary tree, but the nodes value keep this order `left < parent < right`. [Code](https://github.com/amejiarosario/algorithms.js/blob/master/src/data-structures/trees/binary-search-tree.js) | - [BST Time complexity](https://github.com/amejiarosario/dsa.js/blob/master/book/chapters/tree--binary-search-tree.adoc#tree-complexity) + [BST Time complexity](https://github.com/amejiarosario/dsa.js/blob/master/book/chapters/tree-binary-search-tree.adoc#tree-complexity) - 3. **AVL Trees**: Self-balanced BST to maximize look up time. + - **AVL Trees**: Self-balanced BST to maximize look up time. [Code](https://github.com/amejiarosario/algorithms.js/blob/master/src/data-structures/trees/avl-tree.js) | - [AVL Tree docs](https://github.com/amejiarosario/dsa.js/blob/master/book/chapters/tree--avl.adoc) + [AVL Tree docs](https://github.com/amejiarosario/dsa.js/blob/master/book/chapters/tree-avl.adoc) | - [Self-balancing & tree rotations docs](https://github.com/amejiarosario/dsa.js/blob/master/book/chapters/tree--self-balancing-rotations.adoc) + [Self-balancing & tree rotations docs](https://github.com/amejiarosario/dsa.js/blob/master/book/chapters/tree-self-balancing-rotations.adoc) - 4. **Red-Black Trees**: Self-balanced BST more loose than AVL to + - **Red-Black Trees**: Self-balanced BST more loose than AVL to maximize insertion speed. [Code](https://github.com/amejiarosario/algorithms.js/blob/master/src/data-structures/trees/red-black-tree.js) -2. **Maps**: key-value store. +--- - 1. **Hash Maps**: implements map using a hash function. - [Code](https://github.com/amejiarosario/dsa.js/blob/master/src/data-structures/maps/hash-maps/hash-map.js) - | - [HashMap time complexity](https://github.com/amejiarosario/dsa.js/blob/master/book/chapters/map-hashmap.adoc#hashmap-time-complexity) - - +
- 2. **Tree Maps**: implement map using a self-balanced BST. - [Code](https://github.com/amejiarosario/dsa.js/blob/master/src/data-structures/maps/tree-maps/tree-map.js) - | - [TreeMap docs](https://github.com/amejiarosario/dsa.js/blob/master/book/chapters/map-treemap.adoc) - | - [TreeMap time complexity](https://github.com/amejiarosario/dsa.js/blob/master/book/chapters/map-hashmap-vs-treemap.adoc#treemap-time-complexity-vs-hashmap) +
+ + Implement a binary search tree for fast lookups. + -3. **Graphs**: data **nodes** that can have a connection or **edge** to - zero or more adjacent nodes. Unlike trees, nodes can have multiple - parents, loops. - [Code](https://github.com/amejiarosario/algorithms.js/blob/master/src/data-structures/graphs/graph.js) - | - [Graph Time Complexity](https://github.com/amejiarosario/dsa.js/blob/master/book/chapters/graph.adoc#graph-complexity) - +--- + +#### [Implement a binary search tree for fast lookups](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/chapters/tree-binary-search-tree.adoc) -## Algorithms +- Learn how to add/remove/update values in a tree: +![inserting node in a tree](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/raw/master/book/images/image36.png) -- Sorting algorithms +- [How to make a tree balanced?](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/chapters/tree-self-balancing-rotations.adoc) +From unbalanced BST to balanced BST +``` +1 2 + \ / \ + 2 => 1 3 + \ + 3 +``` + + +--- + +
+
+ +### βš’ [Algorithms Techniques](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/chapters/part4.adoc) + + + + + +
+
+ + Never get stuck solving a problem with 7 simple steps + + +--- + +#### [Never get stuck solving a problem with 7 simple steps](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/chapters/algorithmic-toolbox.adoc) + +1. Understand the problem +1. Build a simple example (no edge cases yet) +1. Brainstorm solutions (greedy algorithm, Divide and Conquer, Backtracking, brute force) +1. Test your solution on the simple example (mentally) +1. Optimize the solution +1. Write Code, yes, now you can code. +1. Test your written code + +Full details [here](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/chapters/algorithmic-toolbox.adoc) + +--- + +
+
+ + Master the most popular sorting algorithms (mergesort, quicksort, insertion sort, ...) + + +--- + +#### [Master the most popular sorting algorithms](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/chapters/sorting-intro.adoc) + +We are going to explore three basic sorting algorithms O(n2) which have low overhead: - Bubble Sort. [Code](https://github.com/amejiarosario/dsa.js/blob/master/src/algorithms/sorting/bubble-sort.js) | @@ -155,6 +437,7 @@ We are covering the following data structures. | [Docs](https://github.com/amejiarosario/dsa.js/blob/master/book/chapters/selection-sort.adoc) +and then discuss efficient sorting algorithms O(n log n) such as: - Merge Sort. [Code](https://github.com/amejiarosario/dsa.js/blob/master/src/algorithms/sorting/merge-sort.js) | @@ -165,35 +448,70 @@ We are covering the following data structures. | [Docs](https://github.com/amejiarosario/dsa.js/blob/master/book/chapters/quick-sort.adoc) -- Greedy Algorithms +--- - - Fractional Knapsack Problem. - [Code](https://github.com/amejiarosario/dsa.js/blob/master/src/algorithms/knapsack-fractional.js) - | - [Docs](https://github.com/amejiarosario/dsa.js/blob/master/book/chapters/greedy-algorithms--knapsack-problem.adoc) +
+
+ + Learn different approaches to solve problems such as divide and conquer, dynamic programming, greedy algorithms, and backtracking. + -- Divide and Conquer +--- - - Merge Sort. - [Code](https://github.com/amejiarosario/dsa.js/blob/master/src/algorithms/sorting/merge-sort.js) - | - [Docs](https://github.com/amejiarosario/dsa.js/blob/master/book/chapters/merge-sort.adoc) +#### [Learn different approaches to solve algorithmic problems](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/chapters/algorithms-intro.adoc) - - Fibonacci Numbers. - [Code](https://github.com/amejiarosario/dsa.js/blob/master/src/algorithms/fibonacci-recursive.js) - | - [Docs](https://github.com/amejiarosario/dsa.js/blob/master/book/chapters/divide-and-conquer--fibonacci.adoc) +We are going to discuss the following techniques for solving algorithms problems: +- [Greedy Algorithms](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/chapters/greedy-algorithms.adoc): makes greedy choices using heuristics to find the best solution without looking back. +- [Dynamic Programming](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/chapters/dynamic-programming.adoc): a technique for speeding up recursive algorithms when there are many _overlapping subproblems_. It uses _memoization_ to avoid duplicating work. +- [Divide and Conquer](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/chapters/divide-and-conquer.adoc): _divide_ problems into smaller pieces, _conquer_ each subproblem and then _join_ the results. +- [Backtracking](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/book/chapters/backtracking.adoc): search _all (or some)_ possible paths. However, it stops and _go back_ as soon as notice the current solution is not working. +- _Brute Force_: generate all possible solutions and tries all of them. (Use it as a last resort or as the starting point to optimize it with other techniques). -- Dynamic Programming +--- - - Fibonacci with memoization. - [Code](https://github.com/amejiarosario/dsa.js/blob/master/src/algorithms/fibanacci-dynamic-programming.js) - | - [Docs](https://github.com/amejiarosario/dsa.js/blob/master/book/chapters/dynamic-programming--knapsack-problem.adoc) +
+
-- Backtracking algorithms +## FAQ - - Word permutations. - [Code](https://github.com/amejiarosario/dsa.js/blob/master/src/algorithms/permutations-backtracking.js) - | - [Docs](https://github.com/amejiarosario/dsa.js/blob/master/book/chapters/backtracking.adoc) +
+ How would I apply these to my day-to-day work? +

+ As a programmer, we have to solve problems every day. If you want to solve problems well, then it's good to + know about a broad range of solutions. A lot of times, it's more efficient to learn existing resources than + stumble upon the answer yourself. The more tools and practice you have, the better. This book helps you + understand the tradeoffs among data structures and reason about algorithms performance. +

+
+ +
+ Hey OP, why you created this repo/book? +

+ There are not many books about Algorithms in JavaScript. This material fills the gap. + Also, it's good practice :) +

+
+ +
+ Is there anyone I can contact if I have questions about something in particular? + +

+ Yes, open an issue or ask questions on the slack channel. +

+
+ +## Support + +Reach out to me at one of the following places! + +- Twitter at `@amejiarosario` +- Slack at `dsajs.slack.com` + + +## Donations + +The best way to support this project is buying the [book](https://books.adrianmejia.com/dsajs-data-structures-algorithms-javascript/), so I can invest more time into this project and keep improving it. + +## License + +[![License](https://img.shields.io/:license-mit-blue.svg?style=flat-square)](https://github.com/amejiarosario/dsa.js-data-structures-and-algorithms-in-javascript/blob/master/LICENSE) diff --git a/book/book-o.adoc b/book/book-o.adoc index d85353a2..6fc2744b 100644 --- a/book/book-o.adoc +++ b/book/book-o.adoc @@ -86,15 +86,15 @@ include::chapters/tree.adoc[] // (g) -include::chapters/tree--binary-search-tree.adoc[] +include::chapters/tree-binary-search-tree.adoc[] -include::chapters/tree--search.adoc[] +include::chapters/tree-search.adoc[] -include::chapters/tree--self-balancing-rotations.adoc[] +include::chapters/tree-self-balancing-rotations.adoc[] :leveloffset: +1 -include::chapters/tree--avl.adoc[] +include::chapters/tree-avl.adoc[] :leveloffset: -1 diff --git a/book/chapters/cheatsheet.adoc b/book/chapters/cheatsheet.adoc index 63090dde..06308b35 100644 --- a/book/chapters/cheatsheet.adoc +++ b/book/chapters/cheatsheet.adoc @@ -23,7 +23,7 @@ include::graph.adoc[tag=table] == Sorting Algorithms -include::sorting--summary.adoc[tag=table] +include::sorting-summary.adoc[tag=table] // https://algs4.cs.princeton.edu/cheatsheet/ // http://bigocheatsheet.com/ diff --git a/book/chapters/divide-and-conquer--fibonacci.adoc b/book/chapters/divide-and-conquer-fibonacci.adoc similarity index 100% rename from book/chapters/divide-and-conquer--fibonacci.adoc rename to book/chapters/divide-and-conquer-fibonacci.adoc diff --git a/book/chapters/divide-and-conquer--intro.adoc b/book/chapters/divide-and-conquer-intro.adoc similarity index 100% rename from book/chapters/divide-and-conquer--intro.adoc rename to book/chapters/divide-and-conquer-intro.adoc diff --git a/book/chapters/divide-and-conquer.adoc b/book/chapters/divide-and-conquer.adoc index 5ee393f9..b394687c 100644 --- a/book/chapters/divide-and-conquer.adoc +++ b/book/chapters/divide-and-conquer.adoc @@ -1,9 +1,9 @@ = Divide and Conquer -include::divide-and-conquer--intro.adoc[] +include::divide-and-conquer-intro.adoc[] :leveloffset: +1 -include::divide-and-conquer--fibonacci.adoc[] +include::divide-and-conquer-fibonacci.adoc[] :leveloffset: -1 diff --git a/book/chapters/dynamic-programming--fibonacci.adoc b/book/chapters/dynamic-programming-fibonacci.adoc similarity index 100% rename from book/chapters/dynamic-programming--fibonacci.adoc rename to book/chapters/dynamic-programming-fibonacci.adoc diff --git a/book/chapters/dynamic-programming--intro.adoc b/book/chapters/dynamic-programming-intro.adoc similarity index 100% rename from book/chapters/dynamic-programming--intro.adoc rename to book/chapters/dynamic-programming-intro.adoc diff --git a/book/chapters/dynamic-programming--knapsack-problem.adoc b/book/chapters/dynamic-programming-knapsack-problem.adoc similarity index 100% rename from book/chapters/dynamic-programming--knapsack-problem.adoc rename to book/chapters/dynamic-programming-knapsack-problem.adoc diff --git a/book/chapters/dynamic-programming.adoc b/book/chapters/dynamic-programming.adoc index 15952702..269a4178 100644 --- a/book/chapters/dynamic-programming.adoc +++ b/book/chapters/dynamic-programming.adoc @@ -5,12 +5,12 @@ endif::[] = Dynamic Programming -include::dynamic-programming--intro.adoc[] +include::dynamic-programming-intro.adoc[] :leveloffset: +1 -include::dynamic-programming--fibonacci.adoc[] +include::dynamic-programming-fibonacci.adoc[] -// include::chapters/dynamic-programming--knapsack-problem.adoc[] +// include::chapters/dynamic-programming-knapsack-problem.adoc[] :leveloffset: -1 diff --git a/book/chapters/greedy-algorithms--intro.adoc b/book/chapters/greedy-algorithms-intro.adoc similarity index 100% rename from book/chapters/greedy-algorithms--intro.adoc rename to book/chapters/greedy-algorithms-intro.adoc diff --git a/book/chapters/greedy-algorithms--knapsack-problem.adoc b/book/chapters/greedy-algorithms-knapsack-problem.adoc similarity index 100% rename from book/chapters/greedy-algorithms--knapsack-problem.adoc rename to book/chapters/greedy-algorithms-knapsack-problem.adoc diff --git a/book/chapters/greedy-algorithms.adoc b/book/chapters/greedy-algorithms.adoc index 057b4a21..43685ec7 100644 --- a/book/chapters/greedy-algorithms.adoc +++ b/book/chapters/greedy-algorithms.adoc @@ -1,9 +1,9 @@ = Greedy Algorithms -include::greedy-algorithms--intro.adoc[] +include::greedy-algorithms-intro.adoc[] :leveloffset: +1 -include::greedy-algorithms--knapsack-problem.adoc[] +include::greedy-algorithms-knapsack-problem.adoc[] :leveloffset: -1 diff --git a/book/chapters/part3.adoc b/book/chapters/part3.adoc index 70c13264..f64d9d2f 100644 --- a/book/chapters/part3.adoc +++ b/book/chapters/part3.adoc @@ -12,18 +12,18 @@ include::tree.adoc[] // (g) <<< -include::tree--binary-search-tree.adoc[] +include::tree-binary-search-tree.adoc[] <<< -include::tree--search.adoc[] +include::tree-search.adoc[] <<< -include::tree--self-balancing-rotations.adoc[] +include::tree-self-balancing-rotations.adoc[] :leveloffset: +1 <<< -include::tree--avl.adoc[] +include::tree-avl.adoc[] :leveloffset: -1 diff --git a/book/chapters/part4.adoc b/book/chapters/part4.adoc index eb353f17..2494091a 100644 --- a/book/chapters/part4.adoc +++ b/book/chapters/part4.adoc @@ -34,7 +34,7 @@ include::merge-sort.adoc[] include::quick-sort.adoc[] <<< -include::sorting--summary.adoc[] +include::sorting-summary.adoc[] :leveloffset: -1 diff --git a/book/chapters/sorting--summary.adoc b/book/chapters/sorting-summary.adoc similarity index 100% rename from book/chapters/sorting--summary.adoc rename to book/chapters/sorting-summary.adoc diff --git a/book/chapters/tree--avl.adoc b/book/chapters/tree-avl.adoc similarity index 100% rename from book/chapters/tree--avl.adoc rename to book/chapters/tree-avl.adoc diff --git a/book/chapters/tree--binary-search-tree.adoc b/book/chapters/tree-binary-search-tree.adoc similarity index 100% rename from book/chapters/tree--binary-search-tree.adoc rename to book/chapters/tree-binary-search-tree.adoc diff --git a/book/chapters/tree--binary-tree-traversal.adoc b/book/chapters/tree-binary-tree-traversal.adoc similarity index 100% rename from book/chapters/tree--binary-tree-traversal.adoc rename to book/chapters/tree-binary-tree-traversal.adoc diff --git a/book/chapters/tree--search.adoc b/book/chapters/tree-search.adoc similarity index 98% rename from book/chapters/tree--search.adoc rename to book/chapters/tree-search.adoc index 31428a41..eb80efd2 100644 --- a/book/chapters/tree--search.adoc +++ b/book/chapters/tree-search.adoc @@ -122,6 +122,6 @@ As you can see the DFS in two iterations is already at one of the farthest nodes :leveloffset: +1 <<< -include::tree--binary-tree-traversal.adoc[] +include::tree-binary-tree-traversal.adoc[] :leveloffset: -1 diff --git a/book/chapters/tree--self-balancing-rotations.adoc b/book/chapters/tree-self-balancing-rotations.adoc similarity index 100% rename from book/chapters/tree--self-balancing-rotations.adoc rename to book/chapters/tree-self-balancing-rotations.adoc diff --git a/deprecated-README.adoc b/deprecated-README.adoc index edc2196e..7c8d8136 100644 --- a/deprecated-README.adoc +++ b/deprecated-README.adoc @@ -18,7 +18,7 @@ toc::[] - Algorithm analysis fundamentals (Big O notation, Time/Space complexity) and examples. - Time/space complexity cheatsheet. -image:book/cover.png[link=https://books.adrianmejia.com, height=400] +image:book/cover.png[link=https://books.adrianmejia.com/dsajs-data-structures-algorithms-javascript/, height=400] == Data Structures We are covering the following data structures. diff --git a/docs/kumu-adriansky-data-structures-algorithms-java.json b/docs/kumu-adriansky-data-structures-algorithms-java.json deleted file mode 100644 index 0effd5ab..00000000 --- a/docs/kumu-adriansky-data-structures-algorithms-java.json +++ /dev/null @@ -1,826 +0,0 @@ -{ - "version": 1, - "name": "Data Structures & Algorithms (Java)", - "description": "https://adrianmejia.com/tags/tutorial-algorithms/", - "proxyImages": true, - "defaultMap": "map-oTNLCxr1", - "defaultPerspective": null, - "attributeRelevance": {}, - "attributes": [ - { - "_id": "attr-txzPBGU8", - "name": "Connection Type", - "format": "string", - "private": false, - "limit": 1, - "category": "General", - "prompt": "list", - "locked": false, - "values": [ - "Same", - "Opposite", - "+", - "-", - "++", - "+-", - "-+", - "--" - ], - "sort": false, - "cluster": false - }, - { - "_id": "attr-gHn442wg", - "name": "Description", - "format": "text", - "private": false, - "limit": 1, - "category": "General", - "prompt": "none", - "locked": false, - "values": [], - "sort": false, - "cluster": false - }, - { - "_id": "attr-MnRXKurr", - "name": "Element Type", - "format": "string", - "private": false, - "limit": 1, - "category": "General", - "prompt": "list", - "locked": false, - "values": [ - "Interface", - "Implementation" - ], - "sort": false, - "cluster": true - }, - { - "_id": "attr-MdQi3NyM", - "name": "Label", - "format": "string", - "private": false, - "limit": 1, - "category": "General", - "prompt": "autocomplete", - "locked": false, - "values": [], - "sort": false, - "cluster": false - }, - { - "_id": "attr-qDEypk4g", - "name": "Loop Type", - "format": "string", - "private": false, - "limit": 1, - "category": "General", - "prompt": "list", - "locked": false, - "values": [ - "Reinforcing", - "Balancing", - "Vicious", - "Virtuous", - "Stabilizing", - "Stagnating" - ], - "sort": false, - "cluster": false - }, - { - "_id": "attr-gs5pisyF", - "name": "Tags", - "format": "string", - "private": false, - "limit": "none", - "category": "General", - "prompt": "autocomplete", - "locked": false, - "values": [], - "sort": false, - "cluster": true - } - ], - "elements": [ - { - "_id": "elem-1zk1fPhL", - "attributes": { - "label": "Hashtable", - "description": "HashTable – This data structure is useful when you need to do the insertion, deletion and the quick access to the given element in constant time. All operations are in O(1).Hash tables are not maintain the insertion sequence. I would like to explain the HashTable little bit in depth because this is commonly using in the industry. As an example a router table. When a packet has to be routed to a specific IP address, the router has to determine the best route by querying the router table in an efficient manner.", - "element type": "Implementation", - "tags": [ - "Java" - ] - } - }, - { - "_id": "elem-8EJczc7U", - "attributes": { - "label": "Vector", - "description": "Vector – When you need to maintain thread safety over the ArrayList use the Vector. If you don’t need any synchronization on each and every operations you have to go for ArrayList otherwise it will give bad performance impact on each operation.", - "element type": "Implementation", - "tags": [ - "Java" - ] - } - }, - { - "_id": "elem-8NWOAz0Q", - "attributes": { - "label": "LinkedList", - "description": "LinkedList – Use the linked list If you need to maintain the list which is no need random access to the values and needed frequent insertions and deletions.\nInsertion and deletion is O(1) and access the (k)th element is O(n).\nBut remember LinkedList is not thread safe.", - "element type": "Implementation", - "tags": [ - "Java", - "Algorithms.js" - ] - } - }, - { - "_id": "elem-BuOTXHM2", - "attributes": { - "label": "Graph", - "element type": "Implementation", - "tags": [ - "Algorithms.js" - ] - } - }, - { - "_id": "elem-HJPMqEFb", - "attributes": { - "label": "LinkedHashMap", - "element type": "Implementation", - "tags": [ - "Java", - "Algorithms.js" - ] - } - }, - { - "_id": "elem-LjGaYrSt", - "attributes": { - "label": "HashSet", - "description": "HashSet – It is not maintaining the duplicates. When you need to maintain the unique list of objects you can use the HashSet. HashSet allows the NULL Objects but it is not maintain the insertion sequence. If you need to maintain the insertion sequence you have to use the LinkedHashSet.", - "element type": "Implementation", - "tags": [ - "Java" - ] - } - }, - { - "_id": "elem-PyBsLSKG", - "attributes": { - "label": "LinkedHashSet", - "element type": "Implementation", - "tags": [ - "Java" - ] - } - }, - { - "_id": "elem-SYBtJkZN", - "attributes": { - "label": "ArrayList", - "description": "ArrayList – Use the array list if you need the random access to the values frequently and same as you don’t need frequent insertion and remove operations.\nAccess the (k)th element is O(1) and insertion and deletion is O(n).\nSame as LinkedList remember ArrayList is not thread safe.", - "element type": "Implementation", - "tags": [ - "Java" - ] - } - }, - { - "_id": "elem-akHMM50Q", - "attributes": { - "label": "Map", - "element type": "Interface", - "tags": [ - "Java", - "JavaScript" - ] - } - }, - { - "_id": "elem-beDl8BKU", - "attributes": { - "label": "HashMap", - "description": "HashMap – Hashmap is used when you need to store the elements as key, value pairs. In the hash map, you cannot duplicate the key but you can duplicate the value with a different key. This does not maintain the insertion sequence. If you need to maintain the insertion sequence you have to use the LinkedHashMap. Remember HasMap is not threading safe if you need thread safety over HashMap you have to use the ConcurrentHashMap", - "element type": "Implementation", - "tags": [ - "Java" - ] - } - }, - { - "_id": "elem-d1IjnVVF", - "attributes": { - "label": "" - } - }, - { - "_id": "elem-dofxK5ff", - "attributes": { - "label": "SortedMap", - "element type": "Implementation", - "tags": [ - "Java" - ] - } - }, - { - "_id": "elem-fNrI1adu", - "attributes": { - "label": "Queue", - "element type": "Interface", - "tags": [ - "Java" - ] - } - }, - { - "_id": "elem-gpVpr8Nr", - "attributes": { - "label": "Stack", - "element type": "Implementation", - "tags": [ - "Java" - ] - } - }, - { - "_id": "elem-iGRqhxDA", - "attributes": { - "label": "Set", - "description": "There are couple of implementations of the Set interface. The most common is the HashSet (fast contains() operation but the order is not guaranteed), TreeSet (this is actually implementation of SortedSet, the instances stored in TreeSet should implement Comparable) and the last commonly used is the LinkedHashSet. The order of LinkedHashSet is derived from the time elements were added into the container.", - "element type": "Interface", - "tags": [ - "Java", - "JavaScript" - ] - } - }, - { - "_id": "elem-jWa6jRnv", - "attributes": { - "label": "Array", - "element type": "Implementation", - "tags": [ - "JavaScript", - "Java" - ] - } - }, - { - "_id": "elem-jxtCogb4", - "attributes": { - "label": "SortedSet", - "element type": "Interface", - "tags": [ - "Java" - ] - } - }, - { - "_id": "elem-nNmZVuwP", - "attributes": { - "label": "TreeMap", - "description": "TreeMap – If you need to maintain the key, value pairs in sorted order this is the data structure suits for that operation. Its guarantees that the given key value pairs arrange in sorted order according to the compareTo() method in Object type which is stored in TreeMap.", - "element type": "Implementation", - "tags": [ - "Java", - "Algorithms.js" - ] - } - }, - { - "_id": "elem-nlmBuunX", - "attributes": { - "label": "TreeSet", - "description": "TreeSet – Same as HashSet this data structure maintains the duplicate free collection and additionally its provide the sorted order of the elements.TreeSet is not allowed the NULL objects. Guarantees log(n) time cost for the basic operations add, remove and contains.", - "element type": "Implementation", - "tags": [ - "Java" - ] - } - }, - { - "_id": "elem-nzrHqvh2", - "attributes": { - "label": "Priority Queue", - "description": "PriorityQueue – We know that queue is a first come first serve basis but some times we need to get the things according to the priority. So if you have that kind of problem use the priority queue. But remember PriorityQueue is not thread safe.", - "element type": "Implementation", - "tags": [ - "Java" - ] - } - }, - { - "_id": "elem-oCEXKLgz", - "attributes": { - "label": "List", - "element type": "Interface", - "tags": [ - "Java" - ] - } - }, - { - "_id": "elem-qDm7IO4f", - "attributes": { - "label": "NavigableSet", - "element type": "Interface", - "tags": [ - "Java" - ] - } - }, - { - "_id": "elem-u6W2zfO2", - "attributes": { - "label": "NaviagableMap", - "element type": "Interface", - "tags": [ - "Java" - ] - } - }, - { - "_id": "elem-yz8SMEqa", - "attributes": { - "label": "Collection", - "element type": "Interface", - "tags": [ - "Java" - ] - } - } - ], - "connections": [ - { - "_id": "conn-2HXiBpnB", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": {}, - "from": "elem-u6W2zfO2", - "to": "elem-akHMM50Q" - }, - { - "_id": "conn-6eWcDvA7", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": {}, - "from": "elem-HJPMqEFb", - "to": "elem-akHMM50Q" - }, - { - "_id": "conn-8uKvLxT4", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": {}, - "from": "elem-iGRqhxDA", - "to": "elem-yz8SMEqa" - }, - { - "_id": "conn-AfusKvT4", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": {}, - "from": "elem-8EJczc7U", - "to": "elem-oCEXKLgz" - }, - { - "_id": "conn-F6J3CXak", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": {}, - "from": "elem-nlmBuunX", - "to": "elem-jxtCogb4" - }, - { - "_id": "conn-GTpzvMYG", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": {}, - "from": "elem-1zk1fPhL", - "to": "elem-akHMM50Q" - }, - { - "_id": "conn-MaEgZYlv", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": {}, - "from": "elem-beDl8BKU", - "to": "elem-akHMM50Q" - }, - { - "_id": "conn-SGAJWPgh", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": {}, - "from": "elem-dofxK5ff", - "to": "elem-akHMM50Q" - }, - { - "_id": "conn-T6WfQDU8", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": {}, - "from": "elem-nzrHqvh2", - "to": "elem-fNrI1adu" - }, - { - "_id": "conn-UP8Gr06h", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": {}, - "from": "elem-oCEXKLgz", - "to": "elem-yz8SMEqa" - }, - { - "_id": "conn-VM5U6fLB", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": {}, - "from": "elem-nlmBuunX", - "to": "elem-qDm7IO4f" - }, - { - "_id": "conn-X1Jmw7gV", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": {}, - "from": "elem-LjGaYrSt", - "to": "elem-iGRqhxDA" - }, - { - "_id": "conn-ZC3K6FdM", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": {}, - "from": "elem-SYBtJkZN", - "to": "elem-oCEXKLgz" - }, - { - "_id": "conn-bjoaaulJ", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": {}, - "from": "elem-nNmZVuwP", - "to": "elem-u6W2zfO2" - }, - { - "_id": "conn-bsgQ64Wt", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": {}, - "from": "elem-gpVpr8Nr", - "to": "elem-oCEXKLgz" - }, - { - "_id": "conn-dLyh2RYc", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": {}, - "from": "elem-jxtCogb4", - "to": "elem-iGRqhxDA" - }, - { - "_id": "conn-eM2gJAuf", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": {}, - "from": "elem-qDm7IO4f", - "to": "elem-nlmBuunX" - }, - { - "_id": "conn-jLujNZTK", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": {}, - "from": "elem-PyBsLSKG", - "to": "elem-LjGaYrSt" - }, - { - "_id": "conn-mhgpONem", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": {}, - "from": "elem-qDm7IO4f", - "to": "elem-jxtCogb4" - }, - { - "_id": "conn-ncfzeFBC", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": {}, - "from": "elem-fNrI1adu", - "to": "elem-fNrI1adu" - }, - { - "_id": "conn-rVjuQQf1", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": {}, - "from": "elem-fNrI1adu", - "to": "elem-yz8SMEqa" - }, - { - "_id": "conn-vUhtkBwg", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": {}, - "from": "elem-8NWOAz0Q", - "to": "elem-oCEXKLgz" - } - ], - "loops": [], - "maps": [ - { - "_id": "map-oTNLCxr1", - "name": "Data Structures", - "description": "![Java Collections](https://i.stack.imgur.com/v0nus.gif)\nhttps://www.slideshare.net/agorolabs/java-103-intro-to-java-data-structures", - "scale": 1, - "center": { - "x": 0, - "y": 0 - }, - "defaultPerspective": "pers-e1iwYwhg", - "defaultElementBehavior": "fixed", - "defaultConnectionDirection": "directed", - "elements": [ - { - "_id": "node-2HTxSiK1", - "position": null, - "pinned": false, - "element": "elem-1zk1fPhL" - }, - { - "_id": "node-2euVreXa", - "position": { - "x": 395.3414449922471, - "y": -276.0427363814492 - }, - "pinned": true, - "element": "elem-nzrHqvh2" - }, - { - "_id": "node-543X3d5N", - "position": null, - "pinned": false, - "element": "elem-nNmZVuwP" - }, - { - "_id": "node-9wx6Urbc", - "position": null, - "pinned": false, - "element": "elem-8NWOAz0Q" - }, - { - "_id": "node-Es9qZKBa", - "position": null, - "pinned": false, - "element": "elem-PyBsLSKG" - }, - { - "_id": "node-IpwVVIm4", - "position": null, - "pinned": false, - "element": "elem-fNrI1adu" - }, - { - "_id": "node-LA5XAgmF", - "position": null, - "pinned": false, - "element": "elem-oCEXKLgz" - }, - { - "_id": "node-LvNDjEhf", - "position": null, - "pinned": false, - "element": "elem-gpVpr8Nr" - }, - { - "_id": "node-Nsy5iU42", - "position": null, - "pinned": false, - "element": "elem-dofxK5ff" - }, - { - "_id": "node-OSsTOlaf", - "position": null, - "pinned": false, - "element": "elem-qDm7IO4f" - }, - { - "_id": "node-QM9JVjKH", - "position": null, - "pinned": false, - "element": "elem-8EJczc7U" - }, - { - "_id": "node-WsnqR15l", - "position": null, - "pinned": false, - "element": "elem-u6W2zfO2" - }, - { - "_id": "node-Wtrja1IL", - "position": null, - "pinned": false, - "element": "elem-yz8SMEqa" - }, - { - "_id": "node-XSfUPQZs", - "position": null, - "pinned": false, - "element": "elem-nlmBuunX" - }, - { - "_id": "node-YtZ7oAFf", - "position": null, - "pinned": false, - "element": "elem-HJPMqEFb" - }, - { - "_id": "node-ZA2zuwOU", - "position": null, - "pinned": false, - "element": "elem-jxtCogb4" - }, - { - "_id": "node-ZNvIOjpS", - "position": null, - "pinned": false, - "element": "elem-akHMM50Q" - }, - { - "_id": "node-ZzHONbgC", - "position": null, - "pinned": false, - "element": "elem-beDl8BKU" - }, - { - "_id": "node-cKJ5a3T8", - "position": { - "x": -253.58322232526314, - "y": 433.10116343664384 - }, - "pinned": true, - "element": "elem-BuOTXHM2" - }, - { - "_id": "node-g4QDhOgT", - "position": null, - "pinned": false, - "element": "elem-SYBtJkZN" - }, - { - "_id": "node-jdc6TD4Y", - "position": null, - "pinned": false, - "element": "elem-iGRqhxDA" - }, - { - "_id": "node-mZ3IGWdR", - "position": null, - "pinned": false, - "element": "elem-LjGaYrSt" - }, - { - "_id": "node-rqpz6PGU", - "position": { - "x": -388.63741771606414, - "y": 347.69922150366733 - }, - "pinned": true, - "element": "elem-jWa6jRnv" - } - ], - "connections": [ - { - "_id": "edge-0EF9qeRW", - "connection": "conn-GTpzvMYG" - }, - { - "_id": "edge-2EEj1PYI", - "connection": "conn-UP8Gr06h" - }, - { - "_id": "edge-6js2rIDf", - "connection": "conn-6eWcDvA7" - }, - { - "_id": "edge-G1zaGFAb", - "connection": "conn-2HXiBpnB" - }, - { - "_id": "edge-J7jluR0n", - "connection": "conn-dLyh2RYc" - }, - { - "_id": "edge-NQ5MEvEa", - "connection": "conn-SGAJWPgh" - }, - { - "_id": "edge-Ns3W7LQe", - "connection": "conn-mhgpONem" - }, - { - "_id": "edge-RUWpFfh9", - "connection": "conn-rVjuQQf1" - }, - { - "_id": "edge-T3n9IBk2", - "connection": "conn-VM5U6fLB" - }, - { - "_id": "edge-VfmN7Xlh", - "connection": "conn-jLujNZTK" - }, - { - "_id": "edge-eLAtSvRs", - "connection": "conn-bsgQ64Wt" - }, - { - "_id": "edge-gRmMBmT7", - "connection": "conn-vUhtkBwg" - }, - { - "_id": "edge-hP8qtinm", - "connection": "conn-X1Jmw7gV" - }, - { - "_id": "edge-jcecy0sb", - "connection": "conn-T6WfQDU8" - }, - { - "_id": "edge-k4r46mW1", - "connection": "conn-ncfzeFBC" - }, - { - "_id": "edge-sD9eHHPq", - "connection": "conn-MaEgZYlv" - }, - { - "_id": "edge-urLgNcey", - "connection": "conn-8uKvLxT4" - }, - { - "_id": "edge-wNx7g4QS", - "connection": "conn-bjoaaulJ" - }, - { - "_id": "edge-wp0dhotw", - "connection": "conn-ZC3K6FdM" - }, - { - "_id": "edge-xTE7NLSW", - "connection": "conn-AfusKvT4" - } - ], - "loops": [] - } - ], - "perspectives": [ - { - "_id": "pers-e1iwYwhg", - "name": "Data Structures", - "style": "@settings {\n template: systems;\n element-size: 32;\n}\n\n/* Interface */\nelement[\"element type\"=\"Interface\"] {\n color: #b9e5a0;\n}\n\n/* Interface */\nelement[\"element type\"=\"Implementation\"] {\n color: #fff1a2;\n}\n\n" - }, - { - "_id": "pers-QrYEOUf4", - "name": "Java" - }, - { - "_id": "pers-YahnnHQl", - "name": "JavaScript", - "style": "@settings {\n include: [\"tags\"=\"JavaScript\"], connection, loop;\n}\n\n" - } - ] -} \ No newline at end of file diff --git a/docs/kumu-adriansky-data-structures-algorithms-java.xlsx b/docs/kumu-adriansky-data-structures-algorithms-java.xlsx deleted file mode 100644 index 0cf9d507..00000000 Binary files a/docs/kumu-adriansky-data-structures-algorithms-java.xlsx and /dev/null differ diff --git a/docs/kumu-adriansky-data-structures-algorithms.json b/docs/kumu-adriansky-data-structures-algorithms.json deleted file mode 100644 index 3c71b68a..00000000 --- a/docs/kumu-adriansky-data-structures-algorithms.json +++ /dev/null @@ -1,904 +0,0 @@ -{ - "version": 1, - "name": "Data Structures & Algorithms", - "description": "https://adrianmejia.com/tags/tutorial-algorithms/ | https://github.com/amejiarosario/algorithms.js", - "proxyImages": true, - "defaultMap": "map-XRQ4EgY4", - "defaultPerspective": null, - "attributeRelevance": {}, - "attributes": [ - { - "_id": "attr-5FVVZ7Y3", - "name": "Connection Type", - "format": "string", - "private": false, - "limit": 1, - "category": "General", - "prompt": "list", - "locked": false, - "values": [ - "Same", - "Opposite", - "+", - "-", - "++", - "+-", - "-+", - "--" - ], - "sort": false, - "cluster": false - }, - { - "_id": "attr-cZUsrV5e", - "name": "Description", - "format": "text", - "private": false, - "limit": 1, - "category": "General", - "prompt": "none", - "locked": false, - "values": [], - "sort": false, - "cluster": false - }, - { - "_id": "attr-lWIoeHdx", - "name": "Element Type", - "format": "string", - "private": false, - "limit": 1, - "category": "General", - "prompt": "list", - "locked": false, - "values": [ - "Built-in Object", - "Abstract/Interface", - "User-defined Class", - "Algorithm" - ], - "sort": false, - "cluster": true - }, - { - "_id": "attr-lP6GjNy0", - "name": "Label", - "format": "string", - "private": false, - "limit": 1, - "category": "General", - "prompt": "autocomplete", - "locked": false, - "values": [], - "sort": false, - "cluster": false - }, - { - "_id": "attr-0QlKay5x", - "name": "Loop Type", - "format": "string", - "private": false, - "limit": 1, - "category": "General", - "prompt": "list", - "locked": false, - "values": [ - "Reinforcing", - "Balancing", - "Vicious", - "Virtuous", - "Stabilizing", - "Stagnating" - ], - "sort": false, - "cluster": false - }, - { - "_id": "attr-5KytGMoB", - "name": "Tags", - "format": "string", - "private": false, - "limit": "none", - "category": "General", - "prompt": "autocomplete", - "locked": false, - "values": [], - "sort": false, - "cluster": true - } - ], - "elements": [ - { - "_id": "elem-1V0d2csT", - "attributes": { - "label": "LRU Cache", - "element type": "Algorithm" - } - }, - { - "_id": "elem-2i1obsmP", - "attributes": { - "label": "Breadth-First Search (BFS)", - "element type": "Algorithm", - "tags": [ - "graph", - "non-linear-data-structure" - ] - } - }, - { - "_id": "elem-7WCA8jwe", - "attributes": { - "label": "Map", - "element type": "Built-in Object", - "tags": [ - "map", - "non-linear-data-structure" - ] - } - }, - { - "_id": "elem-8ec0eAui", - "attributes": { - "label": "Queue", - "element type": "User-defined Class", - "description": "**Queue**: data flows in a \"first-in, first-out\" (FIFO) manner. [Code](https://github.com/amejiarosario/algorithms.js/tree/master/src/data-structures/queues) | [Details](https://adrianmejia.com/blog/2018/04/28/data-structures-time-complexity-for-beginners-arrays-hashmaps-linked-lists-stacks-queues-tutorial/#Queues).", - "tags": [ - "linear-data-structure" - ] - } - }, - { - "_id": "elem-9qa2EaEh", - "attributes": { - "label": "Red-Black Tree", - "element type": "User-defined Class", - "description": "**Red-Black Trees**: Self-balanced BST more loose than AVL to maximize insertion speed. [Code](https://github.com/amejiarosario/algorithms.js/blob/master/src/data-structures/trees/red-black-tree.js) | Details", - "tags": [ - "tree", - "non-linear-data-structure" - ] - } - }, - { - "_id": "elem-BPSqtzdd", - "attributes": { - "label": "Binary Tree", - "element type": "User-defined Class", - "description": "**Binary Trees**: same as a tree but only can have two children at most. [Details](https://adrianmejia.com/blog/2018/06/11/data-structures-for-beginners-trees-binary-search-tree-tutorial/#Binary-Trees)", - "tags": [ - "tree", - "non-linear-data-structure" - ] - } - }, - { - "_id": "elem-BdZmnHXa", - "attributes": { - "label": "Tree", - "element type": "User-defined Class", - "description": "**Trees**: data nodes has zero or more adjacent nodes a.k.a. children. Each node can only have one parent node otherwise is a graph not a tree. [Code](https://github.com/amejiarosario/algorithms.js/tree/master/src/data-structures/trees) | [Details](https://adrianmejia.com/blog/2018/06/11/data-structures-for-beginners-trees-binary-search-tree-tutorial/)", - "tags": [ - "tree", - "non-linear-data-structure" - ] - } - }, - { - "_id": "elem-GmjG4113", - "attributes": { - "label": "Graph", - "element type": "User-defined Class", - "tags": [ - "graph", - "non-linear-data-structure" - ] - } - }, - { - "_id": "elem-JpFTClfV", - "attributes": { - "label": "Array", - "element type": "Built-in Object", - "description": "**Arrays**: Built-in in most languages so not implemented here. [Code](https://github.com/amejiarosario/algorithms.js/blob/master/src/data-structures/arrays/array.js) | [Details](https://adrianmejia.com/blog/2018/04/28/data-structures-time-complexity-for-beginners-arrays-hashmaps-linked-lists-stacks-queues-tutorial/#Array).", - "tags": [ - "linear-data-structure" - ] - } - }, - { - "_id": "elem-OOjxCahT", - "attributes": { - "label": "Tree Map", - "element type": "User-defined Class", - "description": "**Tree Maps**: implement map using a self-balanced BST.", - "tags": [ - "map", - "non-linear-data-structure" - ] - } - }, - { - "_id": "elem-P0W5tdJF", - "attributes": { - "label": "Linked List", - "element type": "User-defined Class", - "description": "**Linked Lists**: each data node has a link to the next (and previous). [Code](https://github.com/amejiarosario/algorithms.js/tree/master/src/data-structures/linked-lists) | [Details](https://adrianmejia.com/blog/2018/04/28/data-structures-time-complexity-for-beginners-arrays-hashmaps-linked-lists-stacks-queues-tutorial/#Linked-Lists).", - "tags": [ - "linear-data-structure" - ] - } - }, - { - "_id": "elem-RN6cCpAs", - "attributes": { - "label": "Set (interface)", - "element type": "Abstract/Interface", - "tags": [ - "set", - "non-linear-data-structure" - ] - } - }, - { - "_id": "elem-U5IcLqEX", - "attributes": { - "label": "Map (interface)", - "element type": "Abstract/Interface", - "tags": [ - "map", - "non-linear-data-structure" - ] - } - }, - { - "_id": "elem-YzNstnCu", - "attributes": { - "label": "Depth-First Search (DFS)", - "element type": "Algorithm", - "tags": [ - "graph", - "non-linear-data-structure" - ] - } - }, - { - "_id": "elem-cKKpu4f6", - "attributes": { - "label": "TreeSet", - "element type": "User-defined Class", - "tags": [ - "set", - "non-linear-data-structure" - ] - } - }, - { - "_id": "elem-fb7QKiB4", - "attributes": { - "label": "Stack", - "element type": "User-defined Class", - "description": "**Stacks**: data flows in a \"last-in, first-out\" (LIFO) manner. [Code](https://adrianmejia.com/blog/2018/04/28/data-structures-time-complexity-for-beginners-arrays-hashmaps-linked-lists-stacks-queues-tutorial/#Stacks) | [Details](https://github.com/amejiarosario/algorithms.js/tree/master/src/data-structures/stacks).", - "tags": [ - "linear-data-structure" - ] - } - }, - { - "_id": "elem-knNzSjl1", - "attributes": { - "label": "AVL Tree", - "element type": "User-defined Class", - "description": "**AVL Trees**: Self-balanced BST to maximize look up time. [Code](https://github.com/amejiarosario/algorithms.js/blob/master/src/data-structures/trees/avl-tree.js) | [Details](https://adrianmejia.com/blog/2018/07/16/self-balanced-binary-search-trees-with-avl-tree-data-structure-for-beginners/)", - "tags": [ - "tree", - "non-linear-data-structure" - ] - } - }, - { - "_id": "elem-lsVXVDSI", - "attributes": { - "label": "Hash Map", - "element type": "User-defined Class", - "description": "**Hash Maps**: implements map using a hash function. [Code](https://github.com/amejiarosario/algorithms.js/blob/master/src/data-structures/hash-maps/hashmap.js) | [Details](https://adrianmejia.com/blog/2018/04/28/data-structures-time-complexity-for-beginners-arrays-hashmaps-linked-lists-stacks-queues-tutorial/#HashMaps)", - "tags": [ - "map", - "non-linear-data-structure" - ] - } - }, - { - "_id": "elem-mN3BgWop", - "attributes": { - "label": "Set", - "element type": "Built-in Object", - "tags": [ - "set", - "non-linear-data-structure" - ] - } - }, - { - "_id": "elem-rYLx2odj", - "attributes": { - "label": "Binary Search Tree", - "element type": "User-defined Class", - "description": "**Binary Search Trees** (BST): same as binary tree, but the nodes value keep this order `left < parent < rigth`. [Code](https://github.com/amejiarosario/algorithms.js/blob/master/src/data-structures/trees/binary-search-tree.js) | [Details](https://adrianmejia.com/blog/2018/06/11/data-structures-for-beginners-trees-binary-search-tree-tutorial/#Binary-Search-Tree-BST)", - "tags": [ - "tree", - "non-linear-data-structure" - ] - } - }, - { - "_id": "elem-xWVMvYCS", - "attributes": { - "label": "HashSet", - "element type": "User-defined Class", - "tags": [ - "set", - "non-linear-data-structure" - ] - } - } - ], - "connections": [ - { - "_id": "conn-0hBdsKaV", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": {}, - "from": "elem-lsVXVDSI", - "to": "elem-U5IcLqEX" - }, - { - "_id": "conn-1Xm2EO1P", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": { - "label": "made-of" - }, - "from": "elem-lsVXVDSI", - "to": "elem-JpFTClfV" - }, - { - "_id": "conn-2pdNBvVI", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": {}, - "from": "elem-7WCA8jwe", - "to": "elem-U5IcLqEX" - }, - { - "_id": "conn-8Lof8qEo", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": {}, - "from": "elem-knNzSjl1", - "to": "elem-rYLx2odj" - }, - { - "_id": "conn-9m5FlHYk", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": { - "label": "" - }, - "from": "elem-BdZmnHXa", - "to": "elem-GmjG4113" - }, - { - "_id": "conn-Cpl8qVDM", - "direction": "directed", - "delayed": false, - "reversed": true, - "attributes": {}, - "from": "elem-YzNstnCu", - "to": "elem-GmjG4113" - }, - { - "_id": "conn-DRZ8wQIi", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": { - "label": "made-of" - }, - "from": "elem-OOjxCahT", - "to": "elem-9qa2EaEh" - }, - { - "_id": "conn-GVAr7Bx7", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": {}, - "from": "elem-2i1obsmP", - "to": "elem-8ec0eAui" - }, - { - "_id": "conn-Hg8yMarr", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": {}, - "from": "elem-YzNstnCu", - "to": "elem-fb7QKiB4" - }, - { - "_id": "conn-HsdZVAG6", - "direction": "directed", - "delayed": false, - "reversed": true, - "attributes": {}, - "from": "elem-cKKpu4f6", - "to": "elem-RN6cCpAs" - }, - { - "_id": "conn-J66co79u", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": {}, - "from": "elem-OOjxCahT", - "to": "elem-U5IcLqEX" - }, - { - "_id": "conn-OZtNCOos", - "direction": "directed", - "delayed": false, - "reversed": true, - "attributes": {}, - "from": "elem-mN3BgWop", - "to": "elem-RN6cCpAs" - }, - { - "_id": "conn-PwgmbNXO", - "direction": "directed", - "delayed": false, - "reversed": true, - "attributes": { - "label": "made-of" - }, - "from": "elem-8ec0eAui", - "to": "elem-P0W5tdJF" - }, - { - "_id": "conn-TdJe5NJi", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": {}, - "from": "elem-rYLx2odj", - "to": "elem-BPSqtzdd" - }, - { - "_id": "conn-WQgf5R6K", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": {}, - "from": "elem-BPSqtzdd", - "to": "elem-BdZmnHXa" - }, - { - "_id": "conn-WyFH7hTU", - "direction": "directed", - "delayed": false, - "reversed": true, - "attributes": { - "label": "made-of" - }, - "from": "elem-fb7QKiB4", - "to": "elem-P0W5tdJF" - }, - { - "_id": "conn-XZGa8EDV", - "direction": "directed", - "delayed": false, - "reversed": true, - "attributes": {}, - "from": "elem-2i1obsmP", - "to": "elem-GmjG4113" - }, - { - "_id": "conn-fvSStKM3", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": {}, - "from": "elem-1V0d2csT", - "to": "elem-lsVXVDSI" - }, - { - "_id": "conn-fxuEXuiG", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": { - "label": "made-of" - }, - "from": "elem-lsVXVDSI", - "to": "elem-P0W5tdJF" - }, - { - "_id": "conn-ks1N7mYk", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": {}, - "from": "elem-1V0d2csT", - "to": "elem-P0W5tdJF" - }, - { - "_id": "conn-m1upWjwp", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": { - "label": "made-of" - }, - "from": "elem-cKKpu4f6", - "to": "elem-9qa2EaEh" - }, - { - "_id": "conn-rVEH0SR1", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": { - "label": "made-of" - }, - "from": "elem-xWVMvYCS", - "to": "elem-lsVXVDSI" - }, - { - "_id": "conn-rkbSTcWc", - "direction": "directed", - "delayed": false, - "reversed": false, - "attributes": {}, - "from": "elem-9qa2EaEh", - "to": "elem-rYLx2odj" - }, - { - "_id": "conn-sIJjxft1", - "direction": "directed", - "delayed": false, - "reversed": true, - "attributes": {}, - "from": "elem-xWVMvYCS", - "to": "elem-RN6cCpAs" - } - ], - "loops": [], - "maps": [ - { - "_id": "map-XRQ4EgY4", - "name": "DSA", - "description": "# Data Structures and Algorithms in JavaScript\n\nThis [repository](https://github.com/amejiarosario/algorithms.js) covers the implementation of the most important algorithms and data structures.\n\nThis goes along with [these posts series](https://adrianmejia.com/tags/tutorial-algorithms/) that explain each implementation in details.\n\n## Data Structures\nWe are covering the following data structures.\n\n### Linear Data Structures\n1. **Arrays**: Built-in in most languages so not implemented here. [Code](https://github.com/amejiarosario/algorithms.js/blob/master/src/data-structures/arrays/array.js) | [Details](https://adrianmejia.com/blog/2018/04/28/data-structures-time-complexity-for-beginners-arrays-hashmaps-linked-lists-stacks-queues-tutorial/#Array).\n2. **Linked Lists**: each data node has a link to the next (and previous). [Code](https://github.com/amejiarosario/algorithms.js/tree/master/src/data-structures/linked-lists) | [Details](https://adrianmejia.com/blog/2018/04/28/data-structures-time-complexity-for-beginners-arrays-hashmaps-linked-lists-stacks-queues-tutorial/#Linked-Lists).\n3. **Queue**: data flows in a \"first-in, first-out\" (FIFO) manner. [Code](https://github.com/amejiarosario/algorithms.js/tree/master/src/data-structures/queues) | [Details](https://adrianmejia.com/blog/2018/04/28/data-structures-time-complexity-for-beginners-arrays-hashmaps-linked-lists-stacks-queues-tutorial/#Queues).\n4. **Stacks**: data flows in a \"last-in, first-out\" (LIFO) manner. [Code](https://adrianmejia.com/blog/2018/04/28/data-structures-time-complexity-for-beginners-arrays-hashmaps-linked-lists-stacks-queues-tutorial/#Stacks) | [Details](https://github.com/amejiarosario/algorithms.js/tree/master/src/data-structures/stacks).\n\n### Non-Linear Data Structures\n1. **Trees**: data nodes has zero or more adjacent nodes a.k.a. children. Each node can only have one parent node otherwise is a graph not a tree. [Code](https://github.com/amejiarosario/algorithms.js/tree/master/src/data-structures/trees) | [Details](https://adrianmejia.com/blog/2018/06/11/data-structures-for-beginners-trees-binary-search-tree-tutorial/)\n\t1. **Binary Trees**: same as tree but only can have two children at most. [Details](https://adrianmejia.com/blog/2018/06/11/data-structures-for-beginners-trees-binary-search-tree-tutorial/#Binary-Trees)\n\t1. **Binary Search Trees** (BST): same as binary tree, but the nodes value keep this order `left < parent < rigth`. [Code](https://github.com/amejiarosario/algorithms.js/blob/master/src/data-structures/trees/binary-search-tree.js) | [Details](https://adrianmejia.com/blog/2018/06/11/data-structures-for-beginners-trees-binary-search-tree-tutorial/#Binary-Search-Tree-BST)\n\t2. **AVL Trees**: Self-balanced BST to maximize look up time. [Code](https://github.com/amejiarosario/algorithms.js/blob/master/src/data-structures/trees/avl-tree.js) | [Details](https://adrianmejia.com/blog/2018/07/16/self-balanced-binary-search-trees-with-avl-tree-data-structure-for-beginners/)\n\t3. **Red-Black Trees**: Self-balanced BST more loose than AVL to maximize insertion speed. [Code](https://github.com/amejiarosario/algorithms.js/blob/master/src/data-structures/trees/red-black-tree.js) | Details\n2. **Maps**: key-value store.\n\t1. **Hash Maps**: implements map using a hash function. [Code](https://github.com/amejiarosario/algorithms.js/blob/master/src/data-structures/hash-maps/hashmap.js) | [Details](https://adrianmejia.com/blog/2018/04/28/data-structures-time-complexity-for-beginners-arrays-hashmaps-linked-lists-stacks-queues-tutorial/#HashMaps)\n\t2. **Tree Maps**: implement map using a self-balanced BST. WIP\n3. **Graphs**: data *nodes* that can have a connection or *edge* to zero or more adjacent nodes. Unlike trees, nodes can have multiple parents, loops. [Code](https://github.com/amejiarosario/algorithms.js/blob/master/src/data-structures/graphs/graph.js) | [Details](https://adrianmejia.com/blog/2018/05/14/data-structures-for-beginners-graphs-time-complexity-tutorial/)", - "scale": 1, - "center": { - "x": 0, - "y": 0 - }, - "defaultPerspective": "pers-sYkm0TkQ", - "defaultElementBehavior": "fixed", - "defaultConnectionDirection": "directed", - "elements": [ - { - "_id": "node-5tQr0JTn", - "position": { - "x": 0.2938420444329424, - "y": -245.7085378765175 - }, - "pinned": true, - "element": "elem-P0W5tdJF" - }, - { - "_id": "node-6BSTZyQj", - "position": { - "x": -828.0203278578788, - "y": -280.05178307096736 - }, - "pinned": true, - "element": "elem-U5IcLqEX" - }, - { - "_id": "node-80ko8DNm", - "position": { - "x": -1595.1691082870589, - "y": -13.18574456555474 - }, - "pinned": true, - "element": "elem-RN6cCpAs" - }, - { - "_id": "node-85fz4UMU", - "position": { - "x": -1009.8888888888897, - "y": -92.55555555555543 - }, - "pinned": true, - "element": "elem-7WCA8jwe" - }, - { - "_id": "node-94o1HCum", - "position": { - "x": -619.7603341864639, - "y": 790.974167885234 - }, - "pinned": true, - "element": "elem-BPSqtzdd" - }, - { - "_id": "node-99DZ56X4", - "position": { - "x": 74.82819066909019, - "y": -446.18936624391415 - }, - "pinned": true, - "element": "elem-JpFTClfV" - }, - { - "_id": "node-B0eHF46N", - "position": { - "x": -204.31583432957726, - "y": 433.69998376733685 - }, - "pinned": true, - "element": "elem-2i1obsmP" - }, - { - "_id": "node-IJKiRpeV", - "position": { - "x": -800.1111111111113, - "y": -76.5555555555556 - }, - "pinned": true, - "element": "elem-OOjxCahT" - }, - { - "_id": "node-NahJYUvt", - "position": { - "x": -611.1173966720867, - "y": -547.8584636987166 - }, - "pinned": true, - "element": "elem-1V0d2csT" - }, - { - "_id": "node-Sl4l6ySS", - "position": { - "x": -860.0181826901855, - "y": 782.141557087908 - }, - "pinned": true, - "element": "elem-rYLx2odj" - }, - { - "_id": "node-Uofq0lba", - "position": { - "x": -64.30295030748903, - "y": 6.18732848869417 - }, - "pinned": true, - "element": "elem-8ec0eAui" - }, - { - "_id": "node-VkNp3X13", - "position": { - "x": -1095.1476753945808, - "y": 705.2904229253417 - }, - "pinned": true, - "element": "elem-knNzSjl1" - }, - { - "_id": "node-afmTUZ2U", - "position": { - "x": -609.9994682960996, - "y": 542.629955861598 - }, - "pinned": true, - "element": "elem-BdZmnHXa" - }, - { - "_id": "node-axNlDmnw", - "position": { - "x": -1435.571621505889, - "y": 148.66475161163942 - }, - "pinned": true, - "element": "elem-cKKpu4f6" - }, - { - "_id": "node-co7UYy0l", - "position": { - "x": -1655.1439760987612, - "y": 173.20701345995877 - }, - "pinned": true, - "element": "elem-mN3BgWop" - }, - { - "_id": "node-eaB22PIl", - "position": { - "x": -1413.4891479131552, - "y": -115.70991806957724 - }, - "pinned": true, - "element": "elem-xWVMvYCS" - }, - { - "_id": "node-lLXZCSVF", - "position": { - "x": 75.53047596369821, - "y": 561.5140739762383 - }, - "pinned": true, - "element": "elem-YzNstnCu" - }, - { - "_id": "node-mslJXfx7", - "position": { - "x": -930.700784986541, - "y": 535.358795172126 - }, - "pinned": true, - "element": "elem-9qa2EaEh" - }, - { - "_id": "node-nuWxybjd", - "position": { - "x": -136.0046990272827, - "y": 652.8934885436946 - }, - "pinned": true, - "element": "elem-GmjG4113" - }, - { - "_id": "node-pF0bVumb", - "position": { - "x": 156.29384204443295, - "y": -2.70853787651766 - }, - "pinned": true, - "element": "elem-fb7QKiB4" - }, - { - "_id": "node-wLFOnKwM", - "position": { - "x": -639.3787367051906, - "y": -136.82109786188937 - }, - "pinned": true, - "element": "elem-lsVXVDSI" - } - ], - "connections": [ - { - "_id": "edge-0yei5Eyv", - "connection": "conn-WyFH7hTU" - }, - { - "_id": "edge-0zlGSHhE", - "curvature": 0.06737513283740508, - "connection": "conn-9m5FlHYk" - }, - { - "_id": "edge-4mpgG5CM", - "connection": "conn-rkbSTcWc" - }, - { - "_id": "edge-5n3Apjve", - "curvature": -0.06397306454298402, - "connection": "conn-TdJe5NJi" - }, - { - "_id": "edge-BYQKVfcF", - "curvature": -0.1160180300104184, - "connection": "conn-fvSStKM3" - }, - { - "_id": "edge-E6v8oP7L", - "connection": "conn-J66co79u" - }, - { - "_id": "edge-GCZ94xUR", - "connection": "conn-OZtNCOos" - }, - { - "_id": "edge-HZZLVMUZ", - "curvature": -0.7004513570231601, - "connection": "conn-8Lof8qEo" - }, - { - "_id": "edge-Hblb8LCX", - "curvature": -0.41313825822042033, - "connection": "conn-m1upWjwp" - }, - { - "_id": "edge-IXEpe86Q", - "connection": "conn-1Xm2EO1P" - }, - { - "_id": "edge-IeU9Pj4Y", - "connection": "conn-sIJjxft1" - }, - { - "_id": "edge-LxRO25BO", - "connection": "conn-HsdZVAG6" - }, - { - "_id": "edge-VnhHd1BH", - "connection": "conn-0hBdsKaV" - }, - { - "_id": "edge-X1Pnrr2J", - "curvature": 0.9826493121504574, - "connection": "conn-rVEH0SR1" - }, - { - "_id": "edge-ZYaTIL7x", - "curvature": -0.4196816048063069, - "connection": "conn-Hg8yMarr" - }, - { - "_id": "edge-ZiZWAVVb", - "connection": "conn-2pdNBvVI" - }, - { - "_id": "edge-fqpbWA5e", - "connection": "conn-ks1N7mYk" - }, - { - "_id": "edge-kY1CoiJT", - "curvature": -0.4021121520419193, - "connection": "conn-Cpl8qVDM" - }, - { - "_id": "edge-qb4ccE56", - "connection": "conn-PwgmbNXO" - }, - { - "_id": "edge-rPoM8i3c", - "curvature": -0.42568911436323215, - "connection": "conn-XZGa8EDV" - }, - { - "_id": "edge-rd7hxYfR", - "curvature": -0.3024058825996379, - "connection": "conn-fxuEXuiG" - }, - { - "_id": "edge-uLillQFs", - "connection": "conn-DRZ8wQIi" - }, - { - "_id": "edge-vCrlbS98", - "curvature": -0.009728059454312533, - "connection": "conn-WQgf5R6K" - }, - { - "_id": "edge-x77dOlhx", - "connection": "conn-GVAr7Bx7" - } - ], - "loops": [] - } - ], - "perspectives": [ - { - "_id": "pers-sYkm0TkQ", - "name": "DSA", - "style": "@settings {\n template: systems;\n theme: light;\n element-color: categorize(\"Element Type\", neon2);\n element-size: 65;\n font-size: 31;\n}\n\n" - } - ] -} \ No newline at end of file diff --git a/docs/kumu-adriansky-data-structures-algorithms.xlsx b/docs/kumu-adriansky-data-structures-algorithms.xlsx deleted file mode 100644 index 38fd6864..00000000 Binary files a/docs/kumu-adriansky-data-structures-algorithms.xlsx and /dev/null differ diff --git a/notes.md b/notes.md index e4260290..b7133c11 100644 --- a/notes.md +++ b/notes.md @@ -33,6 +33,24 @@ New features in this release git log HEAD --grep feat ``` +# Generate TOC + +Install +``` +npm install -g doctoc +``` + +Add to *.md: +``` + + +``` + +Run: +``` +doctoc README.md +``` + # Roadmap - [x] PDF: callouts and emojis are not showing correctly