Advertisement
cincout

Untitled

Oct 1st, 2020
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. val positionsContainer = Array<MutableCollection<Int>>(data.numberOfPages + 1) { mutableListOf<Int>() }
  2. for (id in data.calls.indices) {
  3. positionsContainer[data.calls[id]].add(id)
  4. }
  5. for (id in 1..data.numberOfPages) {
  6. positionsContainer[id].add(data.calls.size + 1)
  7. }
  8. 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