Performance
Algorithm A performs 10n2 basic operations and algorithm B
performs 300 lg n basic operations. For what value of n does
algorithm B start to show its better performance?
Coin Problem
You are given 9 gold coins that look identical. One is
counterfeit and weighs a bit greater than the others, but
the difference is very small that only a balance scale can
tell it from the real one. You have a balance scale that
costs 25 USD per weighing.
Give an algorithm that finds the counterfeit coin with as
little weighting as possible. Of primary importance is that
your algorithm is correct; of secondary importance is that
your algorithm truly uses the minimum number of weightings
possible.
HINT: THE BEST ALGORITHM USES ONLY 2 WEIGHINGS!!!
What is the time complexity T(n) of the following program?
a)
int n, d, i, j;
cin >> n;
for (d=1; d<=n; d++)
for (i=1; i<=d; i++)
for (j=1; j<=n; j += n/10)
cout << d << " " << i << " " << j << endl;
b)
void main()
{ int n, s, t;
cin >> n;
for (s = 1; s <= n/4; s++)
{t = s;
while (t >= 1)
{ cout << s << " " << t << endl;
t--;
}
}
}
c)
void main()
{ int n, r, s, t;
cin >> n;
for (r = 2; r <= n; r = r * 2)
for (s = 1; s <= n/4; s++)
{
t = s;
while (t >= 1)
{
cout << s << " " << t << endl;
t--;
}
}
}
How reader and writer problem was implemented and come up
with effective solution for reader and writer problem in
case we have n readers and 1 writer.
Given 1 to n distinct random number of which n+1th element
was duplicated. How do find the duplicate element and
explain the time complexity of the algorithm.
code to positioning of window in certain dimensions
38
How we implement the paypal in my website and how we make a
payment through Credit Card.
30
what is the best algorithm to sort out unique words from a
list of more than 10 million words(1 crore+)?
we need the best technique in the terms of execution time.
How to get the version(major,minor,revision ) of VB6.0
delphi code .I am able to fetch dll file of vb6.0 but not
vba file .Can u send me the code snippet in delphi to get
the value for vb6.0.
84
Write a Program in Visual Basic by means of which we can
send any data from Visual basic program to any other
application running on that machine whether that
application supports OLE or not.....
73
In LSMW , what does the following error mean and how to
rectify it : Incorrect interface data for set 78 in method
C . This error is occuring in idoc processing step of LSMW.