Tarun Kumar
BAN USER
Comments (6)
Reputation 15
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 vote
L = Va*T
L-8 = Vb*T
L=16 = Vc*T
==============
L= Vb*T1
L-10 = Vc*T1
L/(L-10) = Vb/Vc= (L-8)/(L-16)
2L = 80
L = 40 Meter.
Comment hidden because of low score. Click to expand.
0
of 0 vote
sum = rand3()+rand3()+ rand3();
if(sum > 5)
{
return sum%5;
}
return sum;
Comment hidden because of low score. Click to expand.
0
of 0 vote
Hash can be used to create a cache especially communication with data base. key will be search query.
- Tarun Kumar April 18, 2011Comment hidden because of low score. Click to expand.
0
of 0 vote
Small Correction:
sum_left += x[j-1];
sum_right -= x[j];
Comment hidden because of low score. Click to expand.
0
of 0 vote
for(int i =0; i< N; ++i)
{
sum += x[i];
}
int sum_right = sum - x[0] - x[1];
int sum_left = x[0];
int index = 1;
if(sum_right == sum_left)
{
return index;
}
for(int j = 2; j < N; ++j)
{
sum_left += x[j-1];
sum_right -= x[j];
if(sum_right == sum_left)
{
cout<<"Index is :"<<j<<endl;
break;
}
}
cout<<"Index is :"<<"-1"<<endl;
Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
///recursive reverse will work
- Tarun Kumar October 31, 2013reverse(Node* node)
{
if (node == NULL) return;
if (node->next == NULL)
{
head = node;
return;
}
reverse(node->next);
node->next->next = node;
node->next = null;
}