Loading repository data…
Loading repository data…
akhenda / repository
This repository contains some popular Data Structures and Algorithms done in JavaScript, ES6.
This repository contains some popular Data Structures and Algorithms done in JavaScript ES6.
According to Wikipedia:
In computer science, a data structure is a particular way of storing and organizing data in a computer so that it can be used efficiently.
The following terms are the foundation terms of a data structure.
| Data Structure | Access | Search | Insertion | Deletion |
|---|---|---|---|---|
| Array | 1 | n | n | n |
| Stack | n | n | 1 | 1 |
| Queue | n | n | 1 | 1 |
| Linked List | n | n | 1 | 1 |
| Hash Table | - | n | n | n |
| Binary Search Tree | n | n | n | n |
| B-Tree | log(n) | log(n) | log(n) | log(n) |
| AVL Tree | log(n) | log(n) | log(n) | log(n) |
Shown below are the data structures covered here:
This is a process or set of rules to be followed in calculations or other problem-solving operations, especially by a computer.
The following are the algorithms covered here:
An algorithmic paradigm is a generic method or approach which underlies the design of a class of algorithms. It is an abstraction higher than the notion of an algorithm, just as an algorithm is an abstraction higher than a computer program.
| Name | Best | Average | Worst | Memory | Stable |
|---|---|---|---|---|---|
| Bubble sort | n | n2 | n2 | 1 | Yes |
| Insertion sort | n | n2 | n2 | 1 | Yes |
| Selection sort | n2 | n2 | n2 | 1 | No |
| Heap sort | n log(n) | n log(n) | n log(n) | 1 | No |
| Merge sort | n log(n) | n log(n) | n log(n) | n | Yes |
| Quick sort | n log(n) | n log(n) | n2 | log(n) | No |
| Shell sort | n log(n) | depends on gap sequence | n (log(n))2 | 1 | No |
| Counting sort | n + r | n + r | n + r | n + r | Yes |
| * |