Posts

Today...we should see an interesting application of hashing technique.... The Question is Quite simple and required basic programming skills..... One Way Road There are 4 Trucks  A , B , C  and  D . But the road is of only one way and we are interested for the departure of the truck and not the arrival. Truck  A  will depart on every  p , 2p , 3p  day and so on. Truck  B  will depart on every  q  day ,Truck  C  will depart on every  r  day and truck  D  will depart on every  s  day. Find maximum number of Trucks that can be depart in the period of N days. Note  No more than 1 truck can depart in single day Examples:The first input is number of total days followed by p,q,r,s Input :10 2 3 4 5 Output :4 //on day 2 Truck A can depart,on day 3 and 9 Truck B can depart. Truck C cannot depart and Truck D can depart on day 5. Input :10 2 2 4 4 Output :0 //Sin...