equal algorithm and tests, handle initializer_list generically for all algorithms