# while

URL:: https://brilliant.org/courses/computer-science-algorithms/the-speed-of-algorithms-2/best-worst-average/2/
Author:: brilliant.org
## Highlights
> Unlike selection sort, the cost of insertion sort — as measured in terms of the number of comparisons of two array elements — cannot be expressed as a function of the length of the array alone. It also depends on the contents of the array. ([View Highlight](https://read.readwise.io/read/01ga2827dvyyr70qtrq76fmc0a))
---
Title: while
Author: brilliant.org
Tags: readwise, articles
date: 2024-01-30
---
# while

URL:: https://brilliant.org/courses/computer-science-algorithms/the-speed-of-algorithms-2/best-worst-average/2/
Author:: brilliant.org
## AI-Generated Summary
Unlike selection sort, the cost of insertion sort — as measured in terms of the number of comparisons of two array elements — cannot be expressed as a function of the length of the array alone.
## Highlights
> Unlike selection sort, the cost of insertion sort — as measured in terms of the number of comparisons of two array elements — cannot be expressed as a function of the length of the array alone. It also depends on the contents of the array. ([View Highlight](https://read.readwise.io/read/01ga2827dvyyr70qtrq76fmc0a))