注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
1. given an array of strings of equal length, find any two strings that have the same letter on the same position
for example, "abcd" "xxcx", 这俩string在index 2(0-indexed) 都是‘c'
返回各个种类的ship数量
3. 给一个array A, 求所有stable period的数量, stable period的定义是: 长度至少为3的subarray, 而且period内A[i]-A[i-1]==A[i+1]-A[i]
O(n) 遍历即可. |