write an algorithm to find the final arrangement of the flower sticks in the bouquetin c,jaa
Answers
Answered by
0
Answer:
Input:
The input to the function/method consists of three arguments.
num, an integer representing the number of flower sticks (N).
random, an integer representing the number K given by Rosy to Emma sticks
a list of integers representing the length of flower sticks.
Output:
Return a list of integers representing the final pattern of the flower sticks in which Emma gifted the bouquet to her father
Constraints:
Random < num
0 < num < 106
Algorithm:
The logic is to print the elements in a sorted way up to kth value. Then print the remaining elements in reverse order.
Similar questions