Find start and ending index of an element in an unsorted array
Given an array of integers, task is to find the starting and ending position of a given key. Examples: Input : arr[] = {1, 2, 3, 4, 5, 5} Key = 5Output : Start index: 4 Last index: 5Explanation: Starting index where 5is present is 4 and ending index is 5. Input :arr[] = {1, 3, 7, 8, 6}, Key = 2Outpu