Is there are name for the number series which has the following pattern
Starts small, rises in the middle and goes down as in
1,2,3,4,3,2,1
To give you a background of why this question came up. I am relearning sorting algorithms and there was one case on quick sort (sorting is based on divide and conquer and the numbers lesser than the pivot goes to the left and the numbers greater than the pivot goes to the right) where if we chose the pivot as the median in every single slice, we get quadratic performance.
So, if the sequence is something like
1,4,2,5,1,4,2
and during each iteration, if the pivot is exactly the median, then in case of 1,4,2 in the second iteration, the left side is 1,2 and right side is empty. Finally the pivot is appended left side before the right side. If, throughout the entire bag of numbers, the left/right side is empty, then we suffer quadratic performance.
I am trying to blog about this and I am unable to give this series any name. Felt that I should leave it to the math experts.
Tried Googling and searching within the stackexchange but couldn't find (probably didnt know what to search for)