Q1. You will be required to ensure that your program meets the following requirements:
i. Existence of an array which can accept an unknown number of positive integers
ii. Existence of a function which can perform a different sort where the Even numbers will appear
first before the Odd numbers. In this sorted sequence, all the even numbers will appear first
in descending order followed by the odd numbers (in the same order). You are only allowed
to use one array to perform this and NOT allowed to create another temporary array. You may
however expand or reduce the size of your dynamic array in any way you wish to perform this
sort operation.
iii. Perform Best and Worst case analysis of your algorithm. With Complete steps of maths.
Comments
Leave a comment