Category Archives: Tricky Q

Write a C++ Program for Splitting the Choco Bars Problem

C++ Program for Splitting the Choco Bars   Dholu and Bholu are given chocolate bars which are rectangular shaped.Each chocolate is given a label A, B and C. The chocolate is to be splitted into exactly two pieces in a manner such that: The piece that Dholu has can not contain any chocolate with name… Read More »

Find the probability of getting a 1-bit number ?

Find the probability of getting a 1–bit number ? Find the probability of getting a 1-bit number after the following procedure is followed: Initially a number x is chosen at random in a given range .After this we again choose a bit from x randomly? Find the expected number of bit 1s if we randomly… Read More »

Gangs of Dholakpur – Cumulative Weight Problem

Gangs of Dholakpur-Cumulative Weight Problem In the school of Dholakpur the gang having the greatest number of cumulative weight dominates. Currently Kalia’s gang dominates with cumulative weight M.Since, Kalia’s gang is abusive so, Bheem decides to end this and establish peace in the school. Bheem can only defeat Kalia if the cumulative weight of his… Read More »