Unused variable.
This commit is contained in:
parent
bc1888299b
commit
3d17ed29c7
@ -48,14 +48,12 @@ fun main() {
|
||||
fun part2(input: List<String>): Long {
|
||||
var pos = 0
|
||||
var isFile = true
|
||||
var fileId = 0
|
||||
val freeList = Array<MutableSet<Int>>(10) { TreeSet() }
|
||||
val fileList = ArrayList<Pair<Int, Int>>((input[0].length + 1) / 2)
|
||||
for (c in input[0]) {
|
||||
val size = c - '0'
|
||||
if (isFile) {
|
||||
fileList.add(pos to size)
|
||||
fileId++
|
||||
} else if (size > 0) {
|
||||
freeList[size].add(pos)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user