Bisect and binary insertion on sorted lists.