bubble_sort: Perform bubble sorting, counting the number of steps.

View source: R/RcppExports.R

bubble_sortR Documentation

Perform bubble sorting, counting the number of steps.

Description

Perform bubble sorting, counting the number of steps.

Usage

bubble_sort(listdata)

Arguments

listdata

A list of vector and integer. For example, in R code, listdata = list(vec = c(1, 0, 1, ...), cnt = 0). The integer (cnt = 0) is the initial number of steps for bubble sorting.

Value

A List.

Examples

bubble_sort(list(vec = c(1, 1, 0), cnt = 0))


okadalabipr/ASURAT documentation built on Nov. 25, 2022, 5:40 p.m.