powered by
Print the sorting order of a priority queue.
sorting(x)
Returns "ascending" or "descending".
"ascending"
"descending"
An CppPriorityQueue object.
cpp_priority_queue, sort.
q <- cpp_priority_queue(4:6) sorting(q) # [1] "descending" q <- cpp_priority_queue(4:6, "ascending") sorting(q) # [1] "ascending"
Run the code above in your browser using DataLab