Hello Little bubble help please?

i have a bubble sort problem. it s kinda:

i have an array with n natural number elements, and a p value ( p< n). Need to sort numbers ascending till p , and descending after.. please any help[begginer] .

Thank you.
Topic archived. No new replies allowed.