Thanks to visit codestin.com Credit goes to kotlinlang.org
Returns the first element, or throws NoSuchElementException if this deque is empty.
Thanks for your feedback!