c++, Computer Engineering

At a shop of marbles, packs of marbles are prepared. Packets are named A, B, C, D, E …….. All packets are kept in a VERTICAL SHELF in random order. Any numbers of packets with these names could be kept in that shelf as in this example: bottom of shelf ---> [AAAJKRDFDEWAAYFYYKK]-----Top of shelf. All these packets are to be loaded on cars. The cars are lined in order, so that the packet could be loaded on them. The cars are also named [A, B, C, D, E,………….]. Each Car will load the packet with the same alphabet. So, for example, car ‘A’ will load all the packets with name ‘A’. Each particular car will come at the loading point only once. The cars will come at the loading point in alphabetical order. So, car ‘B’ will come and take all the packets with name ‘B’ from the shelf, then car ‘C’ will come. No matter how deep in the shelf any packet ‘B’ is, all of the ‘B’ packets will be displaced before the ‘C’ car arrives. For that purpose, some additional shelves are provided. The packets which are after the packet B, are kept in those shelves. Any one of these shelves contains only packets, having the same name. For example, if any particular shelf is used and if a packet with name X is in it, then only the packets having names X will be kept in it. That shelf will look like [XXXXXXX]. If any shelf is used once, then it could be used again only if it is vacant. Packets from the initial shelf could be unloaded from top only. Write a program that finds the minimum total number of shelves, including the initial one required for this loading process.
Posted Date: 8/31/2012 4:46:09 AM | Location : United States







Related Discussions:- c++, Assignment Help, Ask Question on c++, Get Answer, Expert's Help, c++ Discussions

Write discussion on c++
Your posts are moderated
Related Questions
Q. What do you mean by PROC Directive? PROC Directive: Code segment comprises executable code for a program that includes one or more procedures defined initially with PROC dir

Explain the Fixed Logic Versus Programmable Logic? The Logic devices can be classified into two broad categories - fixed and programmable. The same as the name suggests, the ci

How are the applications of generic framework for electronic commerce performed? To perform applications, this is essential to have Supporting Information and Organizational In

a) Input names of students from the user, terminated by "ZZZ", 0, 0, 0 and create a data file grades with records of the following form: Student (string), test1 (integer), test2 (i

Quadratic probing: In the above case when the first insertion is made the probability of latest element being inserted in a certain position is 1/n    where n is the size of the a

We have to make an application that will dynamically add a menu strip with menu items to a form(ie NOT dragged and dropped onto the form) in Visual Basic. The menu strip should be

Internet:  The Internet, an umbrella term cover countless network and services that comprise a super-network, is a global network of computer networks that was started in the 1

What is applying of an Open Source Systems?   No licensing issues No initial cost Speed of Access Openness and Transparency

The following is the required interface for the mouse and cheese problem. Your program is required to read its input from a file named 'maze.txt' In the maze.txt

Objects, messages, class, inheritance and polymorphism are the major concepts of object orientation.