Pregunta de entrevista de Bloomberg

find target sum elements in array, find max diff in array

Respuestas de entrevistas

Anónimo

12 de nov de 2017

class MaxDifferenceTwoElements { int MaxDifference(int arr[],int arr_size) { int max_diff=arr[1]-arr[0]; int min_elem=arr[0]; for(int i=0;imax_diff) { max_diff=arr[i]-min_elem; } if(arr[i]

Anónimo

29 de nov de 2017

Parse array and keep track of min and max and at the end return difference