Sollicitatievraag bij Microsoft

Write a function that receives byte array and returns the median

Antwoord op sollicitatievraag

Anoniem

6 apr 2021

public static Byte findMedian (Byte[] arr) { Byte[] counter = new Byte[256]; for (int i=0; i=0) { mid = mid - counter[j]; j++; } return Convert.ToByte(--j); }