#include "queue.h" Queue::Queue() { init(); } void Queue::init(){ } void Queue::push(byte value) { list[writeIndex] = value; writeIndex = (writeIndex + 1) % sizeof(list); } byte Queue::pop() { byte value = list[readIndex]; list[readIndex] = 0; readIndex = (readIndex + 1) % sizeof(list); return value; } byte * Queue::clone() { for(int i=0; i maxValue) maxValue = list[i]; } return maxValue; } byte Queue::getMin(){ byte minValue = 255; for (int i=0;i 0) minValue = list[i]; } return minValue; }