skip to Main Content

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

FoodFlop is a new delivery service in the age of Covid-19. No longer allowed to

Place your order now for a similar assignment and have exceptional work written by our team of experts, At affordable rates

For This or a Similar Paper Click To Order Now

FoodFlop is a new delivery service in the age of Covid-19. No longer allowed to bring food items directly to customers in person, this service has a trademark routine where the food is “flopped” (with extra dramatic flair) onto the porch for a contactless delivery.
You’ve been asked by FoodFlop to write a program that can optimize the delivery operations of its team of drivers. There are a few constraints that must be met:
The food is arranged in the delivery car such that only the most recent pickup is available for delivery (in other words, LIFO order). For example, if items A, B, and C were picked up in that order, the next delivery must be C, then B, then A.
Any number of deliveries can be made. The food is kept hot (or cold) by special packaging and can be kept in the car indefinitely.
At the end of the route, all of the food that was picked up must have been delivered.
Write a program that accepts a series of proposed “pickups” and “dropoffs” as input, and outputs whether or not the proposed series is valid. View the below video for some ideas on getting started.
Input
There are only five restaurants in this small town, identified as follows:
Applebee’s
Burger King
Chipotle
Domino’s Pizza
El Pollo Loco
The input file (a text file) is a series of proposed pickup and dropoff sequences which should be independently verified. Each sequence starts with an empty stack and is formatted in the file as follows:
At the beginning of a new sequence, the number of lines in that sequence is given (a single integer by itself, this will be at least 1).
A pickup – labeled with a 1 followed by a letter (A, B, C, D or E for short).
A dropoff – labeled with a 2 followed by a letter.
Example:
This input file has 5 separate series which should be verified independently of each other.
4
1 B
1 A
2 A
2 B
8
1 A
1 B
1 C
2 C
2 B
1 D
2 D
2 A
3
1 D
1 A
2 A
4
1 B
1 C
2 B
2 C
2
1 E
2 E
Output
Your program should output, for each series of pickups and dropoffs, whether this is a valid series, which is true if:
The series can be accomplished, given the constraints, and
All of the food is delivered (the car is empty) at the end of the series
If both of these are true, the series is valid, otherwise it is not valid.
You program should output only ‘valid’ or ‘not valid’, one line per test case. Be sure to turn off any extra cout or debugging statements.
For the example input file above (which has 5 separate series) here is the correct output:
valid
valid
not valid
not valid
valid

For This or a Similar Paper Click To Order Now

Quality Papers

At eliteacademicessays.com, we always aim at 100% customer satisfaction. As such, we never compromise o the quality of our homework services. Elite academic helpers ensure that they craft each paper carefully to match the requirements of the instruction form.

Affordable Prices

Our company maintains a fair pricing system for all academic writing services to ensure affordability. Our pricing system generates quotations based on the properties of individual papers.

Professional Academic Writers

With eliteacademicessay.com, every student is guaranteed high-quality, professionally written papers. We ensure that we hire individuals with high academic qualifications who can maintain our quality policy. These writers undergo further training to sharpen their writing skills, making them more competent in writing academic papers.

Customer Support 24/7

Our customer support works around the clock to provide students with assistance or guidance at any time of the day. Students can always communicate with us through our live chat system or our email and receive instant responses. Feel free to contact us via the Chat window or support email: support@eliteacademicessays.com

.

100% Originality

Eliteacademicessays.com maintains a zero-plagiarism policy in all papers. As such, Elite academic essays professional academic writers ensure that they use the students’ instructions to deliver plagiarism-free papers. We are very keen on avoiding any chance of similarities with previous papers.

On-Time delivery

Elite Academic Essays guarantees all students of swift delivery of papers. We understand that time is an essential factor in the academic world. Therefore, we ensure that we deliver the paper on or before the agreed date to give students ample time for reviewing.

Our Homework Writing Disciplines

Get High-Quality Homework Writing Services
Back To Top