Homework 8 ex 1
You cannot submit for this problem because the homework's deadline is due.
Description
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.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
ab bc cd
Output
cd bc ab
Sample 2 (ordered)
Input
a b c
Output
a b c
Limitation
1s, 32MiB for each test case.
Homework 8
- Status
- Finished
- Problems
- 3
- Open Since
- 2022-11-28 00:00
- DDL
- 2022-12-11 23:59
- Extension
- 24.0 hour(s)