Join Slack
hey why can't I use "removeFirst" here? <https://leetcode.com/playground/EViekAXG>
# getting-started
v
Varun
03/20/2021, 4:08 AM
hey why can't I use "removeFirst" here?
https://leetcode.com/playground/EViekAXG
Varun
03/20/2021, 4:18 AM
managed to get a deque implementation working, but for learning purposes want to understand why i can't use removeFirst
j
jbnizet
03/20/2021, 7:57 AM
Probably because the version of Kotlin that leetcode uses predates version 1.4, and removeFirst has been added to the standard lib in version 1.4:
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/remove-first.html
Open in Slack
Previous
Next
kotlinlang
A modern programming language that makes developers happier.
Powered by