give an example for a C++ program that sorts list of integers. The list should have a size of power of two. Example: list size = 2, 4, 8, 16…

Algorithm
1. Divide the array into two lists until a single element remains in any list

While merging given two sorted lists pull out the smallest element from the heads.

Hey, try something.. We'll help u make it right.

Asking for the complete solution is not encouraged here.. Sorry!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.