trekhleb /
javascript-algorithms
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
98/100 healthLoading repository data…
mehmetpekdemir / repository
Data Structures and Algorithms with Java
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
| Notation | Name |
|---|---|
| O(1) | Constant |
| O(logn) | Logarithmic |
| O(n) | Linear |
| O(nlogn) | n log-star n |
| O(n^2) | Quadratic |
| Operation | Time Complexity |
|---|---|
| Retrieve with index. | O(1) - Constant time |
| Retrieve without index. | O(n) - Linear time |
| Add an element to full array. | O(n) - Linear time |
| Add an element to the end of an array. (has space) | O(1) - Constant time |
| Insert or update an element at a specific index. | O(1) - Constant time |
| Delete an element by setting it to null. | O(1) - Constant time |
| Delete an element by shifting elements. | O(n) - Linear time |
| Performance | Time Complexity |
|---|---|
| Worst Case | O(n^2) - Quadratic time |
| Avarage Case | O(n^2) - Quadratic time |
| Best Case | O(n) - Linear time |
| Performance | Time Complexity |
|---|---|
| Worst Case | O(n^2) - Quadratic time |
| Avarage Case | O(n^2) - Quadratic time |
| Best Case | O(n^2) - Quadratic time |
| Performance | Time Complexity |
|---|---|
| Worst Case | O(n^2) - Quadratic time |
| Avarage Case | O(n^2) - Quadratic time |
| Best Case | O(n) - Linear time |
| Performance | Time Complexity |
|---|
Selected from shared topics, language and repository description—not editorial ratings.
trekhleb /
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
98/100 healthTheAlgorithms /
Algorithms and Data Structures implemented in JavaScript for beginners, following best practices.
98/100 health| Worst Case | O(n^2) - Quadratic time |
| Avarage Case | O(nlogn) - n log-star n |
| Best Case | O(nlogn) - n log-star n |
| Performance | Time Complexity |
|---|---|
| Worst Case | O(nlogn) - n log-star n |
| Avarage Case | O(nlogn) - n log-star n |
| Best Case | O(nlogn) - n log-star n |
| Performance | Time Complexity |
|---|---|
| Worst Case | O(n^2) - Quadratic time |
| Avarage Case | O(nlogn) - n log-star n |
| Best Case | O(nlogn) - n log-star n |
| Performance | Time Complexity |
|---|---|
| Worst Case | O(n+k) |
| Avarage Case | O(n+k) |
| Best Case | O(n+k) |
| Performance | Time Complexity |
|---|---|
| Worst Case | O(kn) |
| Avarage Case | O(kn) |
| Best Case | O(kn) |
| Operation | Time Complexity |
|---|---|
| Insert at last index | O(1) --> If array copy operation is Considered then O(n) |
| Insert at given index | O(n) |
| Search by value | O(n) ( Preferred ) |
| Get by index | O(1) ( Preferred ) |
| Remove by value | O(n) |
| Remove by index | O(n) |
ArrayList<Employee> employees = new ArrayList<>();
| Operation | Time Complexity |
|---|---|
| Insert at last index | O(1) ( Preferred ) |
| Insert at given index | O(n) ( Preferred ) |
| Search by value | O(n) |
| Get by index | O(n) |
| Remove by value | O(n) ( Preferred ) |
| Remove by index | O(n) ( Preferred ) |
LinkedList<Employee> employees= new LinkedList<>();
Vector : Unlike the new collection implementations, Vector is synchronized. If a thread-safe implementation is not needed, it is recommended to use ArrayList in place of Vector.
Performance: ArrayList is faster, since it is non-synchronized, while vector operations give slower performance since they are synchronized (thread-safe).
Vector<Employee> employees = new Vector<>();
LIFO (Last-in-first-out)
| Operation | Time Complexity |
|---|---|
| Push | O(n) |
| Pop | O(1) |
| Peek | O(1) |
| Operation | Time Complexity |
|---|---|
| Push | O(1) |
| Pop | O(1) |
| Peek | O(1) |
| Operation | Time Complexity |
|---|---|
| Search | O(n) |
| Operation | Time Complexity |
|---|---|
| Search | O(logn) |
FIFO (First-in-first-out)
| Operation | Time Complexity |
|---|---|
| Add | O(1) |
| Remove | O(n) |
| Peek | O(1) |
| Operation | Time Complexity |
|---|---|
| Add | O(1) |
| Remove | O(1) |
| Peek | O(1) |
| Operation | Time Complexity |
|---|---|
| Insertion | O(logn) |
| Deletion | O(logn) |
| Retrieval | O(logn) |
:books: collection of JavaScript and TypeScript data structures and algorithms for education purposes. Source code bundle of JavaScript algorithms and data structures book
91/100 healthphishman3579 /
Algorithms and Data Structures implemented in Java
88/100 healthsherxon /
Implementation of Algorithms and Data Structures, Problems and Solutions
93/100 healthjainaman224 /
A comprehensive resource for learning and implementing algorithms and data structures. This repository includes detailed notes, complexity analysis, and code examples in C++, Java, Python, and more. Ideal for students, professionals, and those preparing for coding interviews.
83/100 health