An Open-Source Data Structure and Algorithm Libarary for Javascript π©βπ»
npm install algojo --save
import { linarSearch } from "algojo";
console.log(linearSearch([1, 2, 3, 4, 5, 6, 7], 5)); // 4
algojo is open to contributions, Please read CONTRIBUTING.md for details on this project.
Name | Params | Time Complexity | Space Complexity |
---|---|---|---|
Linear Search | Array, number | O(n) | O(1) |
Binary Search | Array, number | O(log n) | O(1) |
Jump Search | Array, number | O(n) | O(1) |
interpolation Search | Array, number | O(log n) | O(1) |
Fibonacci Search | Array, number | O(log n) | O(1) |
Name | Params | Time Complexity | Space Complexity |
---|---|---|---|
Selection Sort | Array | O(n^2) | O(1) |
Insertion Sort | Array | O(n^2) | O(1) |
Merge Sort | Array | O(n log(n)) | O(n) |
Bubble Sort | Array | O(n^2) | O(1) |