Google新鲜面经

原帖地址:一亩三分地

刚面完,来发个面经求rp求大米~

Given an array of N=10^6 int32 and an int32 X, compute the exact number of triples (a, b, c) of distinct elements of the array so that a + b + c <= X 其实就是和3Sum差不多,不过写完被他问了可能的overflow问题,然后立马改了下就结束了 求大米求大米求大米~~┏ (゜ω゜)=☞ 重要的事情说三遍~~