ReePrime
MCQ on Data Structures Stack || UGC NET Computer Science Mock Test || Stack in Data Structure || mcq questions on computer science || computer science objective questions and answers || computer science mcq questions || computer science objective question

Hosted by Dailymotion. For legal issues report at the Copyright Center, report us on DMC, or use the Instant Removal tool.

MCQ on Data Structures Stack || UGC NET Computer Science Mock Test || Stack in Data Structure || mcq questions on computer science || computer science objective questions and answers || computer science mcq questions || computer science objective question

C
Computer Science

15 Views • Mar 21, 2020

Description

This is a ugc net computer science mock test , also you can be used for kvs pgt computer science mock test .

Series : Data Structure and Algorithm

Topic : Stack in Data Structure

Consider the following statements:
S1: A queue can be implemented using two stacks.
S2: A stack can be implemented using two queues.
Which of the following is correct?
(A)S1is correct and S2 is not correct.
(B) S1 is not correct and S2 is correct.
(C) Both S1 and S2 are correct.
(D) Both S1 and S2 are incorrect Previous Year Question Paper UGC NET Computer Science




2.Assume that the operators +, -, × are left associative and ^ is right associative. The order of precedence (from highest to lowest) is ^, x , +, -. The postfix expression corresponding to the infix expression a + b × c – d ^ e ^ f is
(A)abc × + def ^ ^ –
(B)abc × + de ^ f ^ –
(C) ab + c × d – e ^ f ^
(D) – + a × bc ^ ^ def GATE Computer Science Questions




3. To evaluate an expression without any embedded function calls:
(A)One stack is enough
(B)Two stacks are needed
(C) As many stacks as the height of the expression tree are needed
(D) A Turing machine is needed in the general case GATE Computer Science Questions




4. The result evaluating the postfix expression 10 5 + 60 6 / * 8 – is
(A)284
(B)213
(C) 142
(D) 71 GATE Computer Science Questions




5. Suppose a stack is to be implemented with a linked list instead of an array. What would be the effect on the time complexity of the push and pop operations of the stack implemented using linked list (Assuming stack is implemented efficiently)?

(A) O(1) for insertion and O(n) for deletion
(B) O(1) for insertion and O(1) for deletion

(C) O(n) for insertion and O(1) for deletion

(D) O(n) for insertion and O(n) for deletion GATE Computer Science Questions

The minimum number of stacks needed to implement a queue is
(A)3
(B) 1
(C) 2
(D) 4 ISRO Computer Science Question Papers




The best data structure to check whether an arithmetic expression has balanced parenthesis is a
(A)Queue
(B) Stack
(C) Tree
(D) List ISRO Computer Science Question Papers




The seven elements A, B, C, D, E, F and G are pushed onto a stack in reverse order, i.e., starting from G. The stack is popped five times and each element is inserted into a queue.Two elements are deleted from the queue and pushed back onto the stack. Now, one element is popped from the stack. The popped item is ________.
(A)A
(B) B
(C) F
(D) G Previous Year Question Paper UGC NET Computer Science




Consider the following operations performed on