4 ms·
I really enjoy doing these problems in Elixir, but the fact that the default collection type is a linked list makes certain problems difficult. However, Erlang
by regulation_d 5y ago
I really enjoy doing these problems in Elixir, but the fact that the default collection type is a linked list makes certain problems difficult. However, Erlang does have a fifo queue (a doubly linked list), which can be helpful and let's you practice some Erlang interop while you're at it. https://www.erlang.org/doc/man/queue.html https://www.erlang.org/doc/man/queue.html
- princemaple 5y agoqueue in erlang is a tuple with 2 lists. it reverses the items in one list and put them in the other, if the second was empty, when you try to access the head of the queue. new items still goes into the first list.