注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
return all combination of indices, 印出來就好 之後問怎麼測試,腦子抽筋 不習慣lambda expression,
public class Solution {
public static void main(String [] args) {
// you can write to stdout for debugging purposes, e.g.
Iterate(new int[] {4, 3, 2}, (indices) ->
{
loopLimits, indices, currentIndex + 1, processor);
}
}
}
interface Processor {
void process(int[] indices);
}
}
|