full counting sort problem implementation