Use a container adequate for the task at hand, e.g. red-black tree.

Reply via email to