implemented a queue data structure

Implemented both an in-place and reference-based queue.