Company: Sigmoid_4nov
Difficulty: medium
The Toy Description Jason has N toys standing in a row on his shelf, from left to right. Each toy carries a unique integer that records its size, and the row is given as an array T . Jason always keeps his favourite toy at the leftmost position of the shelf, so T[0] is the size of his favourite toy. Today Jason's sister rearranged the whole shelf so that the toys stand in increasing order of size. Find the new position of Jason's favourite toy on the rearranged shelf, counting positions from 1 at the left. Complete the function findNewPosition in the editor below. Function Signature int findNewPosition(int input1, int input2[]); Input The input is read from standard input as whitespace-separated integers, in this order: input1 , the number of toys N . input1 integers, the array input2 , which is the array T of toy sizes from left to right. Output Print a single integer: the new position of Jason's favourite toy, using 1-based positions. Examples Example 1 Input: 5 4 5 2 3 1 Output: 4 E