sort

fun sort(comparator: Comparator<in T>)

Sorts this Stack.

Parameters

comparator

Comparator for sorting.