Function linear_rsort()

← Back to Module sorting



Module sorting → linear_rsort()

Description

Sort an array of positive integers in linear time. Array elements will be arranged from highest to lowest. This function uses Counting Sort as its backend

linear_rsort(data)


Parameters


Return Value


Usage Example

import sorting
 
data = [23, 9, 10, 2, 5]
linear_rsort(data)