List<String> list = new LinkedList<String>(Arrays.asList(split));
@Pentium: one more thing: you shouldn't be creating a new instance of Random everytime. Make it a static field and seed it only once.
Arrays.asList: Returns a fixed-size list backed by the specified array.
Create a LinkedList, which supports faster remove.
Instead of calling remove one at a time with random indices, it's better to generate enough random numbers in the range, and then traversing the List once with a listIterator(), calling remove() at appropriate indices. There are questions on stackoverflow on how to generate random but distinct numbers in a given range.
Is LinkedList really faster? Both LinkedList and ArrayList have O(n) remove here :\ It's almost always better to just use an ArrayList
LinkedList vs ArrayList -->There is a performance test graph from Ryan. LinkedList is faster in removing.
Quite a few problems with your code:
String.split(String regex): Splits this string around matches of the given regular expression.
Thanks, I have only limited elements in the string <10 so won't be an optimization problem.
With this, your algorithm would be O(N).
You can't add to it; you can't remove from it. You can't structurally modify the List.
| is a regex metacharacter; if you want to split on a literal |, you must escape it to \|, which as a Java string literal is "\\|".