Question: C++ DATA STRUCTURE Please answer both (or atleast one): 1. Design the system that takes 4 Buttons and 4 corresponding LEDs, such that when a
C++ DATA STRUCTURE
Please answer both (or atleast one):
1. Design the system that takes 4 Buttons and 4 corresponding LEDs, such that when a button is pressed the associated LED will light up for 2 seconds. You do not need to write code, but explain all methods and structures you would use.
2. Design the algorithm. Given a stack of pancakes of varying sizes, sort the stack of pancakes from largest to smallest. However, you only have one spatula that can only flip full sections at a time, i.e. If you flip the bottom pancake, everything will invert. If you flip, the middle pancake, everything from the middle upwards will invert.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
