Question d’entretien chez Goldman Sachs

Find the smallest sub array sum and return the sum

Réponses aux questions d'entretien

Utilisateur anonyme

16 déc. 2019

Sort the array in ascending order. First 2 numbers sum would be the SMALLEST SUBARRAY sum.

4

Utilisateur anonyme

5 juil. 2019

Iterate array to calculate total and the max val. after the 1 iteration , you have total and max val. Smallest sub array sum = totla - max val

2