#include "ArrayStack.h" template class SlowRandomQueue { protected: ods::ArrayStack as; public: SlowRandomQueue(); int size(); void add(T x); T remove(); }; template SlowRandomQueue::SlowRandomQueue() : as() { } template inline int SlowRandomQueue::size() { return as.size(); } template inline void SlowRandomQueue::add(T x) { as.add(x); } template inline T SlowRandomQueue::remove() { int i = rand() % size(); return as.remove(i); }