注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
ebay 24 summer sde intern
1. 只知道很简单,完全忘记是什么题目了
2. cyclic x-shift array, 保证数组中每个值唯一,且1<=value<=array.length(忘了具体定义细节,反正印象中是在1-length范围中连续的唯一的一串数)
比如[5, 6, 1, 2, 3, 4],对于x-shift定义:
0 shift: [5, 6, 1, 2, 3, 4]
1 shift: [4, 5, 6, 1, 2, 3]
2 shift: [3, 4, 5, 6, 1, 2]
要求求出shift几次以后,该数组能成为一个reverse-sorted降序排列的数组,如果无法0]...[m-1, col] [m-1, col+1].....[m-1, n-1]
4. 给定int[] array和int diff, 找到最长的连续子数组,使得满足子数组中所有相邻两数的Math.abs(x-y) <= diff, 返回new int[2], 存储该最长子数组的首尾两数的index。
求加米谢谢谢谢!!!! |