以随机顺序遍历const数组

时间:2015-05-24 01:44:57

标签: c++ algorithm

我想......

this

...但function MyConstructor(val){ this.val = val; return this; //attention here } var example = new MyConstructor(val); std::random_shuffle(begin(a), end(a)); for (auto x : a) { use(x); } 。在O( n )时间和O(1)空间中是否可以进行随机顺序遍历?

0 个答案:

没有答案