The program has the following output: coll1: 1 2 3 4 5 6 7 8 9 coll2: 1 2 3 4 5 6 7 8 9
coll1: 8 2 6 4 5 3 7 1 9 first odd element: 5 coll2: 2 4 6 8 1 3 5 7 9 first odd element: 1 As this example shows, stable_partition(), unlike partition(), preserves the relative order of the even and the odd elements