mohit
BAN USER 0of 0 votes
AnswersConsider a plate stacked with several disks, each of a different diameter. We want to sort these disks in decreasing order according to their diameter so that the widest disk is at bottom of the pile. The only operation available for manipulating the disks is to pick up a stack of them from the top of the pile and invert that stack.
 mohit in India
Give an algorithm for sorting the disks using this operation. Report Duplicate  Flag  PURGE
Algorithm  0of 0 votes
AnswersThere are 1000 balls in a bag, of which 900 are black and 100 are white. I randomly draw 100 balls from the bag. What is the probability that the 101st ball will be black?
 mohit in India
a)9/10 b)More than 9/10 but less than 1 c)Less than 9/10but more than 0 d)0 e)1 Report Duplicate  Flag  PURGE
unknown Student student Probability  0of 0 votes
AnswersAmar and Akbar both tell the truth with probability 3/4 and lie with probability 1/4. Amar watches a test match and talks to Akbar about the outcome. Akbar, in turn, tells Anthony, "Amar told me that India won". What probability should Anthony assign to India's win?
 mohit in India
a)9/16 b)6/16 c)7/16 d)10/16 e)None of the above Report Duplicate  Flag  PURGE
unknown Student student Probability
#include<conio.h>
#include<stdio.h>
main()
{
int a[5]={2,4,1,5,3};
int b[5]={0,0,0,0,0};
int i,p,q;
for (i=0;i<5;i++)
{
b[i]=b[i1]+a[i];
}
printf("Enter i : ");
scanf("%d",&p);
printf("\nEnter j : ");
scanf("%d",&q);
printf("\nsum of terms between i & j is : %d ",b[q]b[p1]);
getch();
}
//Can we do better??

mohit
May 05, 2012
Repmariacbrister, Graphics Programmer at Graphic Systems
Hey, I am Maria and I am from Bluefield. Currently, I work as a freelancer graphic artist. From an early ...
RepWilliamDGiles, Cloud Support Associate at ADP
Spent 20012006 creating marketing channels for tar worldwide. Was quite successful at building tobacco for farmers. Won several awards for ...
Repbrandysolsen, Area Sales Manager at AMD
I am a Social butterflies who enjoy travel.Have fun doing this job and project an atmosphere that reflects Amazon ...
RepAmmoBoard, Employee at A9
The best online ammo shop to buy ammunition for your rifles, handguns & shotguns from top brands you like.
Open Chat in New Window
a=[[1,2,3],[4,5,6],[7,8,9],[10,11,12]]
 mohit July 16, 2016for i in range(len(a)):
if(i%2)==1:
j=2
while(j>1):
print(a[i][j])
j=j1
else:
j=0
while(j<3):
print(a[i][j])
j=j+1