c programming, Computer Engineering

Assignment Help:
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.

Related Discussions:- c programming

own subprogram, Create your own Subprogram that uses at least 1input param...

Create your own Subprogram that uses at least 1input parameter and a return parameter. You decide the theme. You should give the pseudocode and an example Subroutine call. Be sure

What are difference between latches and flipflops, What are difference betw...

What are difference between latches and flipflops? Difference : Latches are level-sensitive, while, flipflops is edge sensitive. It means to say edge sensitive that O/p change

Network, Give an intuitive explanation of why the maximum throughput, for s...

Give an intuitive explanation of why the maximum throughput, for small beta, is approximately the same for CSMA slotted Aloha and FCFS splitting with CSMA. Show the optimal expecte

How different are interface and abstract class in .net, How different are i...

How different are interface and abstract class in .Net? Abstract classes cannot be instantiated it can have or can't have abstract method basically known as must inherit as th

What is test factory, Rational Test Factory is a component-based testing to...

Rational Test Factory is a component-based testing tool that automatically produces TestFactory scripts according to the application's navigational structure. TestFactory is integr

Show the ranges of port numbers, Q. Show the ranges of Port numbers? P...

Q. Show the ranges of Port numbers? Port numbers are divided into three ranges: Well-known ports are those from 0 through 1,023. Registered ports are those from

How the system would work in real time- simulation, How the system would wo...

How the system would work in real time -  Sensors in/near road gather data (these can be infra-red/light sensors, pressure sensors, induction loops etc.) -data is generally num

What is flash memory, Q. What is Flash Memory? This memory is other fo...

Q. What is Flash Memory? This memory is other form of semiconductor memory that was first introduced in mid-1980.  These memories can be reprogrammed at high speed and therefo

Performance of caches - computer architecture, Performance of caches: ...

Performance of caches:       Amdahl's Law regarding overall speed up:                  Alternatively, CPU stall can be considered:

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd