bubbleSort: Bubble sort

View source: R/bubbleSort.R

bubbleSortR Documentation

Bubble sort

Description

Sorts the vector x into ascending order using a very inefficient bubble sort algorithm

Usage

bubbleSort(x)

Arguments

x

a vector of numbers

Value

the vector x sorted into ascending order

Examples

set.seed(123)
x = rnorm(10)
bubbleSort(x)

jmcurran/jaggR documentation built on Nov. 2, 2023, 11:04 a.m.