filmov
tv
GATE CS 2013,Q31: Consider the following function:int unknown(int n){ int i, j, k=0; for (i=n/2; i
Показать описание
GATE CS 2013,Q31: Consider the following function:
int unknown(int n){
int i, j, k=0;
for (i=n/2; i≤n; i++)
for (j=2; j ≤ n; j=j*2)
k = k + n/2;
return (k);
}
The return value of the function is
(A) Θ(n^2) (B) Θ(n^2log n) (C) Θ(n^3) (D) Θ(n^3logn)
Ans : (B) Θ(n2log n)
----------------------------------------------------
----------------------------------------------------------
----------------------------------------------------------------
----------------------------------------------------------------
----------------------------------------------------------------------
-------------------------------------------------------------------
-----------------------------------------------------------------------
#Algorithm#GATE_CSE#GATECS2013#GATECSEPYQ
int unknown(int n){
int i, j, k=0;
for (i=n/2; i≤n; i++)
for (j=2; j ≤ n; j=j*2)
k = k + n/2;
return (k);
}
The return value of the function is
(A) Θ(n^2) (B) Θ(n^2log n) (C) Θ(n^3) (D) Θ(n^3logn)
Ans : (B) Θ(n2log n)
----------------------------------------------------
----------------------------------------------------------
----------------------------------------------------------------
----------------------------------------------------------------
----------------------------------------------------------------------
-------------------------------------------------------------------
-----------------------------------------------------------------------
#Algorithm#GATE_CSE#GATECS2013#GATECSEPYQ
GATE CS 2013,Q31: Consider the following function:int unknown(int n){ int i, j, k=0; for (i=n/2; i
GATE CSE 2013
GATE CSE 2013 Q ||Algorithms || GATE Insights Version: CSE
GATE CSE 2013
Algorithm GATE-2013 Problem Solution
GATE CSE 2013
GATE CSE PYQ Consider the following function: int unknown(int n) { int i, j, k = 0;
Gate Algorithm question in Computer science | Consider the following two functions #shorts
GATE CS 2014 Set 3 | Q40 : Consider a hash table with 100 slots. Collisions are resolved using chain...
GATE CS 2016 Set 1 | Q 14:Let G be a weighted connected undirected graph with distinct positive edge...
GATE 2013 | ALGORITHMS | HEAP SORT | TIME | SOLUTIONS ADDA | GATE TEST SERIES | EXPLAINED BY VIVEK
GATE CSE 2009 Q ||Algorithms || GATE Insights Version: CSE
GATE CSE 2013 || COMPUTER ORGANIZATION || GATE Insights Version: CSE
GATE CSE 2019 Q ||Algorithms || GATE Insights Version: CSE
GATE CSE 1996 Q ||Algorithms || GATE Insights Version: CSE
GATE CSE 1991
GATE 2021 CS SET2 Q31.The relation scheme given below is used to store information [DBMS] [SOLVED!]
GATE - 2006 | OS | Q-31 | Consider three processes with compute time bursts times | GATE2IIT
GATE CS 2013 | Q27 : What is the logical translation of the following statement?“None of my friends...
GATE CSE 2010 Q ||Algorithms || GATE Insights Version: CSE
GATE CSE 2016 SET 1
GATE CS 2013 | Q1:A binary operation ⊕ on a set of integers is defined as x⊕y=x^2+y^2. Which one of...
GATE CSE 1995
GATE CSE 2007 Q || C PROGRAMMING ||Data Structure || GATE Insights Version: CSE
Комментарии