c programming, 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: 9/3/2012 1:39:41 AM | Location : United States

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

Write discussion on c programming
Your posts are moderated
Related Questions
Convert the given S-R flipflop to a D-flip flop. Ans: The Truth Table for S-R Flip-Flop is illustrated in Fig.(a) and truth table of D Flip-Flop is illustrated in Fig.(b)

State in brief about Polymorphism Class hierarchy is the deciding feature in the case of more than one implementation of properties. An object oriented program to compute the

What is SAP dispatcher? SAP dispatcher is the control agent that handles the resources for the R/3 applications.

Define baud rate The rate of data transfer in serial data communication is signified in bps. Bits per second (bps) is the rate of transfer of information bits. Baud is the num

In what order do the events of an ASPX page execute. As a developer is it important to understand these events?   If you try to access it in Page_Load that is way previous th

Q. Show Synchronous mode for point-to-point message passing? Synchronous mode: Transmitting can be started whether or not matching receive has been started, but transmitting w

Second Generation (1954-1962) The second generation saw various significant developments at every level of computer system design, from technology used to build the basic circu

When a window is repainted by the AWT painting thread, it sets the clipping regions to the area of the window that needs repainting.

State about the Object models Object models are used for explaining the objects in the system and their connection with each other in the system. The dynamic model explains in

Example of Weight training calculations: Through having calculated all the error values associated with such each unit like hidden and output then we can now transfer this inf