/** * https://www.hackerrank.com/challenges/dynamic-array/problem * */ class DynamicArray { var lastAnswer = 0 var answerList: ArrayList<Int>? = null var seqs: ArrayList<ArrayList<Int>>? = null fun dynamicArray(n: Int, queries: Array<Array<Int>>): Array<Int> { seqs = ArrayList<...