Skip to content
linuxlsxPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

61 Commits

Folders and files

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

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

⌂ Proxy