Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- method name: 'randSample', type: 'java.util.List<T>', params: [ list: 'java.util.List<T>', min: Integer, max: Integer ]
- method name: 'randSample', type: 'java.util.List<T>', params: [ list: 'java.util.List<T>' ]
- def randSample(List list<T>, Integer min, Integer max) {
- shuffle(list).take nextInt(min, max)
- }
- def randSample(List<T> list) {
- randSample list, 0, list.size()+1
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement