Data Structure 3
Submit solution
Points:
1
Time limit:
1.0s
Memory limit:
64M
Author:
Problem type
Allowed languages
C++, Python3
This practice problem will require you to implement a simple Queue class,
supporting some common functions.
The expected header is as follows (p029.h):
#ifndef _P029
#define _P029
#include "mylist.h"
class Queue {
private:
MyList list;
public:
bool empty();
int front();
void push(int val);
int pop();
};
#endif
Your task is to implement the actual functions for this class.
You can use your own MyList implementation, or you can download the reference
version here (https://jetic.org/download/mylist_linux.zip; https://jetic.org/download/mylist_macOS.zip):
mylist.h
mylist.o
Class Specification
Refer to the in-class slide LS19 for more information.
Input Specification
No input specification. OJ will automatically judge your implementation of
p029.cpp.
Output Specification
No output specification. OJ will automatically judge your implementation of
p029.cpp.
Comments