how to write algorithm in pseudo-code [on hold]


how to write algorithm in pseudo-code [on hold]



How to Write an algorithm in pseudo for finding the median (middle) value of a given array B.
Assume: Array size =N
Hint: Firstly, the array must be arranged is ascending or descending order
If array size is odd, position of median value p=n+1/2
median B[p]
If array size is even p =N/2
Median = (B[p]+B[p+1])/2


p=n+1/2


B[p]


p =N/2


(B[p]+B[p+1])/2



Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.





Show what you've tried and what specifically you need help with. It isn't appropriate to dump homework here without an actual question.
– Carcigenicate
Jun 30 at 18:52






Welcome to Stack Overflow! To increase your chances of getting an answer, please read this post on how to ask a good question.
– Chiperific
Jun 30 at 19:02





Hint states it clearly enough: sort the array and then take either the middle item or average of two middle items
– Dmitry Bychenko
Jun 30 at 19:11




Popular posts from this blog

List of Kim Possible characters

Audio Livestreaming with Python & Flask

NSwag: Generate C# Client from multiple Versions of an API