// FIFO Queue
class HanisQueue {
  items;
  max_size;

  constructor(max_size) {
    this.items = [];
    this.max_size = max_size;
  }

  enqueue(item) {
    if (this.items.includes(item)) {
      return;
    }

    const size = this.items.unshift(item);
    if (size > this.max_size) {
      this.items.pop();
    }
  }
}
