Sample sorting code

Signed-off-by: sonipks <sonipks@gmail.com>