Вы находитесь на странице: 1из 4

Computer Progra sort requires O(n) space when implemented using

A) Array B)Linked List c) Both array & Linked List d) Merge Sort can be implemented using constant
space irrespective of the implementing data structure

Q is given two codes, A and B to solve a problem which has complexity 8 (n3) w (n3) respectively. Her
client wants to solve a problem of size k, which is sufficiently large. Which code should she deliver to the
client in the present scenario?
a) code A b) Code c) both codes have the same execution time so deliver any d) None of theseg is not
possible by using which of the following. Directions: Use the correct answer methods
a) Insertion b) Selection c) Exchange d) deletionn empty stack. The following options are done on it
PUSH(1)
PUSH(2)
POP
PUSH(5)
PUSH(6)
POP
What will the stack contain after these operations? (Top of the stack is underlined)
a) 5 6
b) 1 5
c) 5 6
d) 1 sort that uses the Binary tree concept such that any number in the area is larger than all the
numbers in the subtree below, it is called
a) selection sort b) Insertion Sort c)Heap Sort d)Quick Sonkaj & Mithili were both asked to write the code
to evaluate the following expression
a-b+c/(a-b)+(a-b)
2

Pankaj writes the following code statements (code A)
Print(a-b)+c/(a-b)+(a-b)*(a-b)
Mythili writes the following code statements (code B)
D=(a-b)
Print d+c/d+d*d
If the time taken to load a value in a variable, for addition, multiplication or division between two
operands is same, which of the following is true
a)Code A uses lesser memory and is slower than code B
b) Code A uses lesser memory is faster than code B
c) Code A uses more memory and is faster than code B
d) Code A uses more memory and is slower than code B

r the given array, find the arrangements of elements after 3
rd
pass of Selection Sort. Assume that the
Array is being sorted in ascending order
List 32, 2, 11, 77, 66, 88, 55

a)22,11,33,66,77,55,88
b)11,22,33,55,66,77,88
c) 11,22,33,55,66,88,77
d) 11,22,33,77,66,88,55

e has 5 levels and each node has either 4 children or no children. All nodes on the same level have the
same number of children. How many nodes are there in the tree. (Root is level 1)

a) 341 b) 256 c)1024 d)none of these
Q. 9 A(09)is an array of maximum size 20. The number of elements it contains is stored in the variable,
number Elements. Currently it contains 11 elements. Swati want to insert an element val after the m
th

Element in the array. She writes the following code for it.

For X
A(n+1)=A(n)
End
A(m)=val X
a)n=(m+1) to (number elements-1) increment 1
b) n = m to number Elements increment 1
c)n=m to(number Elements-1) increment 1
d) n = (m+1) to (number elements) increment 0 In C++ which of the following creates a pigeon object of
class bird.
a) pigeon bird
b) bird pigeon
c) pigeon of bird
d) None of theseif GULMOHAR is coded as TFONLSZI, PIPAL will be coded as
a)QJQBM B)QJQBN C)KRKZO D)KIKZO
Q.12 Choose the answer option that arranges the given set of



Q.1 Direction: The question consist of a problem question followed by two statements I and II. Find out
if the information given in the statement (s) is sufficient in finding the solution to the problem
Question: Rohan, Rohit, Ruth, Robert and Robin are sitting around a circular table facing each other.
Who is sitting third to the right or Robin.
Statement
I Robin is to the immediate right of Rohan and to the immediate left of Rohit but Rohit does not sit
besides Ruth.
II Ruth sits second to the right of Robert, passes the book from Robin on his Right to Rohan on his left
a) Statement I alone is sufficient in answering the problem question
b) Statement II alone is sufficient in answering the problem question
c) Either of the statements taken individually is sufficient in answering the problem question
d) Both statements are put together are sufficient in answering the problem question
e) Both the statement even put together are not sufficient in answering the problem question
Q.2 The question consists of a problem question followed by two statement I & II. Find out if the
information given in the statement(s) is sufficient in finding the solution to the problem
P,Q,R, & S are four friends. Who is the youngest among them? Statement
I The total age of P & Q is more than that of R
II The total age of P & S together is less than that of R
a) Statement I alone is sufficient
b) Statement II alone is sufficient
c) Both statements put together are sufficient
d) Both the statements even put together are not sufficient
Q. 3 Decode the word (S) / pattern given in the question
If UFYVW represents RIVET, What does TRDOWBU stand for
a) QUTAR b )QUARTAR c)TARTAR d)TUARTAR
Q.4 Select the right option from the given alternatives
985 , 874 , 763 , ?

a)641
b)542
c)722
d)652

Q.5 Select the right option from the given alternatives
Sagar walks 30 meters west and takes a left turn to walk 10 meters, then takes left turn again and walks
40 meters, and takes another left turn and walks 20 meters. In which direction is he standing now from
the starting point.
a) North-east
b) South-west
c) North-west
d) North
Q.6 Decode the word(s)/pattern given in the question
If Delhi is coded as 34178, What is the code for Mumbai?
a)202801 b)202108 c)202018 d)202081

Q.7 There are four questions based on a same puzzle. Answer the question based on the given
information
1) P,Q,R,S,T and U are six students procuring their masters degree in six different subjects English,
History, Philosophy, Physics, Statistics & Mathematics.
2) Two of the stay in hostel, Two stay as paying guest (PG) and the reaming stay their home.
3) R does not stay as PG and studies philosophy
4)The students studying Statistics and History do not stay as PG.
5) T studies mathematics and S studies Physics
6) U and S stay in hostel. T stays as PG and Q stay at home
a) English-Hotel
b) Mathematics-PG
c) Philosophy-Home
d) Physics-Hostel
e) None of These

Вам также может понравиться