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
Q. Ready and Standard mode for point-to-point message passing? Ready mode: Transmitting can be started only if matching receive has already been initiated.  Standard mode: M

Eight-stage process - Conjunctive normal forms: Hence we notice the following eight-stage process converts any sentence with CNF as:  1.  Eliminate all arrow connectives by

In the message-passing model, there exists a set of tasks that use their own local memories during computation. Multiple tasks can reside on the similar physical machine as well ac

Given the subsequent FIFO and rules, how deep does the FIFO require to be to stop underflow or overflow? RULES: a. frequency(clk_A) = frequency(clk_B) / 4 b. per

Q. Describe the Errors? Errors  Two probabletypes of errors may take place in assembly programs:   a. Programming errors: They are familiar errors you may encounter in

What is branch target? As a result of branch instruction, the processor fetches and implements the instruction at a new address called as branch target, instead of the instruct

IS strategy - Information System As an operations manager when attempting to navigate your organisation through the information landscape and make best use of the available sy

Describe the micro programmed control unit in detail. A micro programmed control unit is built around a storage unit is known as a control store where all the control signals a

What is recursion?  A recursive procedure should have two properties.  What are they? Recursion means function call itself repeatedly.         Properties : (1) There

This step of systems examination is one of the most difficult. In this stage systems specifications are identified by asking what, who, when, where and how. A few questions address