“…The fastest method of sorting is to perform multiple actions (addition and deletion of elements) at the same time [11,12]. We describe these operations as given here, when values are input in a serial order, into the median filter, we can maintain two arrays, one called window array which contains input elements and second one is called sorted array, which contains window elements in sorted fashion(ascending/descending).…”