Skip to content
Snippets Groups Projects
Commit 1246b400 authored by Ivan's avatar Ivan
Browse files

Complétion méthode remove

parent 994ba388
Branches
No related merge requests found
......@@ -53,10 +53,14 @@ public class Main {
list.get(rnd.nextInt(arg0));
}
break;
case "remove":
for(int i = arg0-1; i>=0; i--) {
list.remove(rnd.nextInt(i));
if(arg2 <= arg0) {
int size = arg0;
for (int i = 0; i < arg2; i++) {
list.remove(rnd.nextInt(size-1));
size--;
}
}
break;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment