阅读背景:

如何知道我们应该添加最少的数字以获得完整的数组

来源:互联网 

recently I met a question like this:
Assume you have an int N, and you also have an int[] and each element in this array can only be used once time. And we need to design an algorithm to get 1 to N by adding those numbers and finally return the least numbers we need to add. Assume you




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: