Skip to content

πŸ‘©β€πŸ’» Collection of algorithms & data structures in Python & JavaScript

License

Notifications You must be signed in to change notification settings

nadiannis/algorids

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

21 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


algorids

A collection of algorithms & data structures implemented in Python & JavaScript


Contributions Welcome


Table of Contents

Data Structures

Data Structure is about how data is organized. The organization of data can impact the efficiency of a program.

Algorithms

Algorithm is a set of instructions for completing a specific task. Even if we've decided on a particular data structure, proper selection of which algorithm to use is another factor that can affect the efficiency of a program.

Algorithm Code
Linear Search on Regular Array py, js
Linear Search on Ordered Array py, js
Binary Search py, js
Bubble Sort py, js
Selection Sort py, js
Insertion Sort py, js

Time Complexity

Time complexity is the amount of time taken by an algorithm to run. Time complexity is not an actual time required to execute an algorithm, but the number of steps an algorithm performs to complete its task.

Because the number of steps an algorithm takes can vary depending on the number of data, to help ease communication regarding time complexity or efficiency, we use a formalized expression called Big O Notation.

Big O Notation is a notation that tells how the number of steps changes as the data increases. Big O Notation generally refers to the worst-case scenario, because knowing how inefficient an algorithm can get in a worst-case scenario is more useful, it prepares us for the worst.

Following are several time complexities:

  • $O(1)$, constant time
  • $O(log N)$, log time
  • $O(N)$, linear time
  • $O(N^2)$, quadratic time

Big O Graphs Source: Big O Cheat Sheet

References

Contributing

If you find a bug or have a way to improve this repo, please create an issue or pull request.

License

MIT Β© Annisa Nadia

About

πŸ‘©β€πŸ’» Collection of algorithms & data structures in Python & JavaScript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published