Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- val positionsContainer = Array<MutableCollection<Int>>(data.numberOfPages + 1) { mutableListOf<Int>() }
- for (id in data.calls.indices) {
- positionsContainer[data.calls[id]].add(id)
- }
- for (id in 1..data.numberOfPages) {
- positionsContainer[id].add(data.calls.size + 1)
- }
- val positions = Array<Array<Int>>(data.numberOfPages + 1) { i -> Array<Int>(positionsContainer[i].size) { 0 } }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement