Skip to content

linuxlsx/Algo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My Algo Practice Code

Insert sort

complexity is O(n2)

performance adapts to the initial order of elements

insertion sort is used on quite small data sets

properties:

  • stable : insertion sort retains relative order of the same elements
  • in place

http://www.algolist.net/Algorithms/Sorting/Insertion_sort

Select sort

complexity is O(n2)

n + (n - 1) + (n - 2) + ... + 1, results in O(n2) number of comparisons. Number of swaps may vary from zero (in case of sorted array) to n - 1 (in case array was sorted in reversed order), which results in O(n) number of swaps. Overall algorithm complexity is O(n2).

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages