57
points
Questions
1
Answers
12
-
1/4
Explanation: I am doing the sampling in minutes only.
Lets assume witch A arrives at 0:00 sharp than witch B needs to arrives in a time slot of 0:00 to 0:15 only so as to meet the witch A.
So probability would be (1/60 )* (15/60)
Now witch A can arrive any time so we will multiply by 60.
Hence answer would be(1/60 )* (15/60) *60 = 1/4
- 5451 views
- 1 answers
- 0 votes
-
90
Explanation:
formula is nCr = (n!)/(r!*(n-r)!)
n = 10
r = 2- 4476 views
- 1 answers
- 0 votes
-
40
Explanation:
Let x chapatis was made by mom.
Than equation comes like this
(((((x-1) / 3)-1)/3)-1)/3 >= 1
Since we need to minimize the equation
After solving above equation x comes to be the multiple of 40.- 8178 views
- 1 answers
- 0 votes
-
Answer is 83 days
Ist day = Rs 3
2nd day = Rs 6
3rd day = Rs 2So in 3 days I am increasing my balance by Rs 2.
So I will have Rs 54 in my account in 81 days.
82nd day = Rs 57
83rd day = Rs 60At the end of 83rd day I will be having Rs 60 in my account.
- 4783 views
- 1 answers
- 0 votes
-
35 comparisons
Explanation:
You can create a tournament to find the smallest in 31 comparisons. If we need to find the second smallest, we only need to determine the smallest between those which lost to the smallest. If we use a balance binary tree, there are at most 5 such values which require 4 comparisons.
- 4929 views
- 1 answers
- 0 votes
-
bool
isNthBitSet(unsigned
int
x, unsigned
int
n)
{
return
(x & (1 << (n-1)))?
true
:
false
;
}
bool
isPalindrome(unsigned
int
x)
{
int
l = 1;
// Initialize left position
int
r =
sizeof
(unsigned
int
)*8;
// initialize right position
// One by one compare bits
while
(l < r)
{
if
(isNthBitSet(x, l) != isNthBitSet(x, r))
return
false
;
l++;
r--;}
return
true
;
}
- 6033 views
- 1 answers
- 1 votes
-
The answer is 533 bananas.
Explanation:
The idea is minimize the monkey movement thereby maximizing bananas. So for that we need to always utilize the maximum carrying capacity of monkey, which we can do that by restricting the backward movement of monkey, thereby saving the banana cost.
We have to choose some point in the mid way where monkey can transport bananas.
Bananas remaining 3000.
So we make monkey moves 1 km only
a) Move forward with 1000 bananas – Will eat up 1 banana in the way forward
b) Leave 998 banana after 1 km and return with 1 banana – will eat up 1 banana in the way back
c) Pick up the next 1000 bananas and move forward – Will eat up 1 banana in the way forward
d) Leave 998 banana after 1 km and return with 1 banana – will eat up 1 banana in the way back
e) Will carry the last 1000 bananas from initial and move forward – will eat up 1 bananaA point which is the crux of problem is that the monkey need not to travel back, so he will not consume banana for that.
In this way we will be able to transport all the bananas to 1 km forward, now monkey need not to travel back the initial point, hence we are optimizing the km traveled.
So for travelling 1 Km he consumed 5 bananas.
For 200 km he will consume 1000 bananas.Bananas remaining 2000.
Now we will apply our above logic here again to calculate the bananas consumed per km.
a) Move forward with 1000 bananas – Will eat up 1 banana in the way forward
b) Leave 998 banana after 1 km and return with 1 banana – will eat up 1 banana in the way back
c) Pick up the next 1000 bananas and move forward – Will eat up 1 banana in the way forward
So for travelling 1 Km he consumed 3 bananas.
For 333 km he will consume 1000 bananas.Bananas remaining 1000.
Now since remaining bananas are less than 1000 so monkey needs to travel only in forward direction.Since we already covered 200+333 = 533 km we are left with 467 km.
So monkey will consume 467 bananas while moving forward.Bananas remaining 533.
- 5325 views
- 1 answers
- 0 votes
-
Anyone can jump. Because mountains don’t jump.
- 3377 views
- 2 answers
- 1 votes
-
The largest area that I can enclose is 288 meter square.The idea is to maximize the 44-meter piece in the fence.
We can do that by making it the hypotenuse of right angled triangle.And distributing the rest 48 one meter pieces in other two sides of triangle.
48 meter pieces can be distributed as
a= 24
b= 24
In this way I am utilizing the 34(~33.94) out of 44 meter pieces.Area of right angled triangle is (a*b)/2 = 24*24/2 = 288 square units.
- 4642 views
- 1 answers
- 0 votes
-
- 6828 views
- 2 answers
- 0 votes