此时此刻,我想到小少爷了# Living
c*a
1 楼
上周写了liveramp的OA题,分享给大家:)
之前也看了大家的许多面经,回馈一下。
两道题比较第二道比较新。
1) Given an array A, find the index p, in which A[0] + A[1] +...+ A[p-1] = A
[p+1] + A[p+2] +.. + A[n-1]. Time complex O(n)
2) Given an array A, find the longest subarray which biggest element minus
smallest element not less than 1.
之前也看了大家的许多面经,回馈一下。
两道题比较第二道比较新。
1) Given an array A, find the index p, in which A[0] + A[1] +...+ A[p-1] = A
[p+1] + A[p+2] +.. + A[n-1]. Time complex O(n)
2) Given an array A, find the longest subarray which biggest element minus
smallest element not less than 1.