We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Algorithms
- Sorting
- Find the Median
- Discussions
Find the Median
Find the Median
Sort by
recency
|
534 Discussions
|
Please Login in order to post a comment
c#
public static int findMedian(List arr)
the C code 😁😎
C++ (more at https://github.com/IhorVodko/Hackerrank_solutions/tree/master, feel free to give a star:) )
def findMedian(arr):
arr.sort() n=len(arr) if n %2!=0: return arr[int(n/2)]