Each algorithm and data structure have its own separate README with related explanations and links for further reading and YouTube videos.
Data structure is a particular way of organizing and storing data in a computer so that it can be accessed and modified efficiently. More precisely, a data structure is a collection of data values, the relationships among them, and the functions or operations that can be applied to the data.
Algorithm is an unambiguous specification of how to solve a class of problems. Algorithm is a set of rules that precisely defines a sequence of operations.
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.
npm test -- -t 'LinkedList'
You may play with data-structures and algorithms in
./src/playground/playground.js file and write tests for it in
Then just simply run the following command to test if your playground code works as expected:
npm test -- -t 'playground'
Order of growth of algorithms specified in Big O notation.
Source: Big O Cheat Sheet .
Below is the list of some of the most used Big O notations and their performance comparisons against different sizes of the input data.
|Big O Notation||Computations for 10 elements||Computations for 100 elements||Computations for 1000 elements|
|O(N log N)||30||60||9000|
|Binary Search Tree||n||n||n||n|
|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)||n^2||log(n)||No|
|Shell sort||n log(n)||depends on gap sequence||n (log(n))^2||1||No|