Consider a point P(n,n) in the cartesian co-ordinate system A robot has to start from the origin and reach this point. The only steps the robot can take are : 1 unit right 1 unit up. How many different paths can the robot take to point P. Is there an optimal path to point P. (both up and right steps incur the same cost).
How could i prevent a class from being used as a base class in C++. For example: Consider some class ABC. I would like the user to create objects of class ABC but prevent him from deriving classes from ABC and creating objects of the derived class.
A multiple choice test has 15 questions and 4 choices for each answer. Each question has only one answer correct. How many ways can the 15 questions be answered so that - Exactly 3 answers are correct - Atleast 3 answers are correct
cwd xor ax, dx sub ax, dx cwd- convert word ot double word. sign extend DX:AX, with DX having the signed bit xor ax, dx => ax = ax xor dx sub ax, dx => ax = ax - dx
In a calendar year (assume non-leap), determine how many Friday the thirteenths there can be. What is the smallest number possible?
Write a Recursive function which generates the PowerSet of a given Set. The Set is passed to the Function as a String. And the Function should print the Subsets as Strings. [Note:] PowerSet( {1,2,3} ) = 0, 1, 2, 3, 12, 13, 23, 123 //0 is Null Set. And the Order of the SubSets is not Mandatory. Sample TestCase: I/P :"abc" O/P: 0 a b ab c ac bc abc