Pregunta de entrevista de Microsoft

Write a function that receives byte array and returns the median

Respuesta de la entrevista

Anónimo

6 abr 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); }