Pergunta de entrevista da empresa Microsoft

Write a function that receives byte array and returns the median

Resposta da entrevista

Sigiloso

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