Quinnox Placement Paper Contributed by Neha updated on Aug 2019

           Quinnox Model Placement Paper

 

1.Answer the questions based on the following program

STRUCT DOUBLELIST
{ DOUBLE CLINKED
INT DET; LIST VOID
STRUCT PREVIOUS; (BE GIVEN AND A PROCEDURE TO DELETE)
STRUCT NEW; (AN ELEMENT WILL BE GIVEN)
}
DELETE(STRUCT NODE)
{NODE-PREV-NEXT NODE-NEXT;
NODE-NEXT-PREV NODE-PREV;
IF(NODE==HEAD)
NODE
}

Q. In what case the prev was

(a) All cases
(b) It does not work for the last element
(c) It does not for the first element
(d) None of these

2.Answer the questions based on the following program

VOID FUNCTION(INT KK)
{KK+=20;
}
VOID FUNCTION (INT K)
INT MM,N=&M
KN = K
KN+-=10;
}

3. What is the output of the following program

main()
{ int var=25,varp;
varp=&var;
varp p = 10;
fnc(varp)
printf("%d%d,var,varp);
}

(a) 20,55
(b) 35,35
(c) 25,25
(d)55,55

4. a=2, b=3, c=6 Find the value of c/(a+b)-(a+b)/c

5. What does the hexanumber E78 in radix 7.

(a) 12455
(b) 14153
(c) 14256
(d) 13541
(e) 131112

Ans. (d)

6. 10 : 4 seconds :: ? : 6 minutes

Ans. 900

7 Q is not equal to zero and k = (Q x n - s)/2.What is n?

(a) (2 x k + s)/Q
(b) (2 x s x k)/Q
(c) (2 x k - s)/Q
(d) (2 x k + s x Q)/Q
(e) (k + s)/Q

8. Given an array of integers, find the contiguous sub-array with the largest sum.

ANS. Can be done in O(n) time and O(1) extra space. Scan array from 1 to n. Remember the best sub-array seen so far and the best sub-array ending in i.

9. Given an array of length N containing integers between 1 and N, determine if it contains any duplicates.

ANS. [Is there an O(n) time solution that uses only O(1) extra space and does not destroy the original array?]

10. Sort an array of size n containing integers between 1 and K, given a temporary scratch integer array of size K.

ANS. Compute cumulative counts of integers in the auxiliary array. Now scan the original array, rotating cycles! [Can someone word this more nicely?]

feedback