Pregunta de entrevista de Paytm Labs

Write a function to flatten an array and a binary search question