I was trying to solve the advent of code 2021 challenge day 10 in Kotlin when I needed to use a stack. After finding out that you shouldnt use Stack anymore but ArrayDeque instead I got provided with two options: java.util.ArrayDeque and kotlin.collections.ArrayDeque. I tried out both but only the Java one acted like intended (stack.push(), stack.pop(), etc). The Kotlin one does not provide those methods.
So I was wondering which one I should use in which case.
addFirstandremoveFirstadd and remove elements from the head of the Deque just fine.