Consider the following situation in a restaurant. All the food orders will be sent to the chef in the kitchen. The chef will prepare the food based on the food preparation list. The first ordered food must be prepared first which follows Queue Principle. The maximum order number in food preparation list is 10. The following figure shows the output of the food preparation program. *************** Food Preparation List ******************** 1.Add order 2.Remove order 3.Display 4.Exit Enter option 1 Enter an Element Nasi goreng Inserted order successfully Display Food Preparation List: Nasi lemak Mee goreng Nasi goreng *************** Food Preparation List ******************** 1.Add order 2.Remove order 3.Display 4.Exit Enter option 2 Order removed successfully Display Food Preparation List: Mee goreng Nasi goreng
Write pseudocode with the given output. Show how to implement a linear-time dynamic data structure supporting the First-In-First-Out queue operations. [If you make any assumption, please justify/describ
Comments
Leave a comment