see A(n)ie the average case will always be smaller or equal to the
worst case...
ie something like... A(n)= c. w(n) for some c as constt ... which the
definition of big O...
correct me if i'm wrong..
On Sat, Aug 25, 2012 at 7:11 PM, rahul sharma rahul23111...@gmail.comwrote:
*Let
@ll...thnx a lot
On Sat, Aug 25, 2012 at 8:22 PM, GAURAV CHAWLA togauravcha...@gmail.comwrote:
see A(n)ie the average case will always be smaller or equal to the
worst case...
ie something like... A(n)= c. w(n) for some c as constt ... which the
definition of big O...
correct
*Let w(n) and A(n) denote respectively, the worst case and average case
running time of an algorithm executed on an input of size n. which of the
following is ALWAYS TRUE?*
(A) [image: A(n) = \Omega(W(n))]
(B) [image: A(n) = \Theta(W(n))]
(C) [image: A(n) = O(W(n))]
(D) [image: A(n) = o(W(n))]
Because you can always find a positive constant c for which following
inequality hold true.
A(n) = cW(n) i.e. the avg. case time complexity always upper bounded by
worst case time complexity. Which is the definition of Big O.
On Sat, Aug 25, 2012 at 7:11 PM, rahul sharma
You have to discard option d because , according to definition of small o
notation if f(n) =o(g(n)) then for ALL constants c 0 you have f(n)
cg(n). or Lim(n-infinite) f(n)/g(n) = 0.
On Sat, Aug 25, 2012 at 10:24 PM, vishal yadav vishalyada...@gmail.comwrote:
Because you can always find a
Consider the following C-function in which a[n] and b[m] are two
sorted integer arrays and c[n+m] be an other integer array.
void XYZ(int a[],int b[], int c[])
{
int i,j,k;
i=j=k=0;
while((in)(jm))
{
if (a[i]b[j])
c[k++]=a[i++];
else
c[k++]=b[j++];
}
Which of the following condition(s)
C )
On Tue, Jul 26, 2011 at 9:02 PM, Vijay Khandar vijaykhand...@gmail.comwrote:
Consider the following C-function in which a[n] and b[m] are two
sorted integer arrays and c[n+m] be an other integer array.
void XYZ(int a[],int b[], int c[])
{
int i,j,k;
i=j=k=0;
while((in)(jm))
{
if
Consider the following C-function in which a[n] and b[m] are two
sorted integer arrays and c[n+m] be an other integer array.
void XYZ(int a[],int b[], int c[])
{
int i,j,k;
i=j=k=0;
while((in)(jm))
{
if (a[i]b[j])
c[k++]=a[i++];
else
c[k++]=b[j++];
}
Which of the following condition(s)
hi
void XYZ(int a[],int b[], int c[])
{
int i,j,k;
i=j=k=0;
while((in)(jm))
{
if (a[i]b[j])
c[k++]=a[i++];
else
c[k++]=b[j++];
0
}
In this case either i value or j value is incremented at a time
in an iteration . So its impossible that both the conditions (i n)
and (jm)
10. What does the following fragment of C-program print?
char c[] = GATE2011;
char *p =c;
printf(%s, p + p[3] - p[1]);
(A) GATE2011 (B) E2011 (C) 2011 (D) 011
Answer: - (C)
why is p[3] - p[1] returning 4
--
You received this message because you are subscribed to the Google Groups
p[3] = 'E'
p[1] = 'A'
p[3]-p[1] = 4
?
On Sat, Jul 2, 2011 at 7:10 PM, KK kunalkapadi...@gmail.com wrote:
10. What does the following fragment of C-program print?
char c[] = GATE2011;
char *p =c;
printf(%s, p + p[3] - p[1]);
(A) GATE2011 (B) E2011 (C) 2011 (D) 011
Answer: - (C)
why is
ASCII value of 'A' is 65 and Asciivalue of 'E' is 69.
69-65=4
On Sat, Jul 2, 2011 at 7:12 PM, abhijith reddy abhijith200...@gmail.comwrote:
p[3] = 'E'
p[1] = 'A'
p[3]-p[1] = 4
?
On Sat, Jul 2, 2011 at 7:10 PM, KK kunalkapadi...@gmail.com wrote:
10. What does the following fragment of
sugest study material for gate 2011
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For
13 matches
Mail list logo