h8ex1: Stack, vector, queue, and array

h8ex1: Stack, vector, queue, and array

You cannot submit for this problem because the homework's deadline is due.

Description

  1. Write three C++ functions which read strings from the standard input and print them in the
    reverse order. The first program should be implemented using an array, the second one using a
    vector and the third one using a stack. Argue on the best choice in the README file.

  2. Write three C++ functions which read strings from the standard input and print them in the input order. The first program should be implemented using an array, the second one using a vector and the third one using a queue. Argue on the best choice in the README file.

The declaration of functions in assignment.h are:

void ex1_reverse_array();
void ex1_reverse_vector();
void ex1_reverse_stack();
void ex1_ordered_array();
void ex1_ordered_vector();
void ex1_ordered_queue();

Format

Files

You should submit a tar file containing a c++ source file ex1.cpp

Input

a single line containing space separated strings

Output

a single line containing space separated strings

Sample 1 (reversed)

Input

a b c

Output

c b a

Sample 2 (ordered)

Input

a b c

Output

a b c

Limitation

1s, 32MiB for each test case.

Assignment 8

Not Claimed
Status
Finished
Problems
1
Open Since
2018-08-01 00:00
DDL
2018-08-04 00:00
Extension
240.0 hour(s)