HKUAL_order.h

library


The HKUAL_order.h library contains functions for performing tasks related to sorting, searching and selection. Notice that the library does not provide functions that have already been implemented by STL. Section 1.3 explains briefly the functions provided by STL.

Classes

None

Functions

Function Explaination
countInversion Count the number of inversions in an array
quickSelect Select the k-th item from an array

Variables

None

Operators

None

Functionalities provided by C++ STL

C++ has implemented sorting and searching in its STL. See http://www.cplusplus.com/reference/algorithm/sort/ and http://www.cplusplus.com/reference/algorithm/binary_search/ for using those functions.

 

© The University of Hong Kong Algorithms Library - hkual@cs.hku.hk