Question: How can I solve this problem by using Linked list data structure. Your friend is a chief architect, who is working on building a skyscraper,

How can I solve this problem by using Linked list data structure.How can I solve this problem by using Linked list data structure.

Your friend is a chief architect, who is working on building a skyscraper, in Mumbal. The construction is in such a way that the floors will be constructed in other factories and they will be assembled. All the sizes will be distinct. The skyscraper needs to be constructed in N days with the following conditions i: a) Every day a floor is constructed in a separate factory of distinct size. b) The floor with the larger size must be placed at the bottom of the building. c) The floor with the smaller size must be placed at the top of the building. Note: A floor cannot be assembled in the building until all floors larger in size are placed. As a friend he wants you to build a small program that will help him analyze the construction process, to avoid manual work and errors. Input First Line: contains the total floors N in the building Second Line onwards: Contains N inputs in which the ith integer denotes the size of the floor that will be given to architect by factories on the ith day. Output You are required to print N lines. Print the size of the floor in descending order, which can be Activate assembled

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!