Skip to content

Instantly share code, notes, and snippets.

@erlangparasu
Created May 15, 2019 08:14
Show Gist options
  • Select an option

  • Save erlangparasu/945f21d757b7857c76b462defab76627 to your computer and use it in GitHub Desktop.

Select an option

Save erlangparasu/945f21d757b7857c76b462defab76627 to your computer and use it in GitHub Desktop.
val queue = CircularFifoQueue<String>(5)
queue.add("a")
queue.add("b")
queue.add("c")
queue.add("d")
queue.add("e")
queue.add("f")
queue.add("g")
queue.add("h")
queue.add("i")
for (item in queue) {
System.out.println(item)
}
// Output:
// e
// f
// g
// h
// i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment