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) S1 is 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 not correct.

1 Answer

Answer :

(C) Both S1 and S2 are correct.

Related questions

Description : Consider the following statements for priority queue: S1: It is a data structure in which the intrinsic ordering of the elements does determine the result of its basic operations. S2: The elements of a priority queue ... . (C) SI is incorrect and S2 is correct. (D) Both S1 and S2 are correct.

Last Answer : (D) Both S1 and S2 are correct.

Description : Consider the following statements S1 and S2 : S1 : A hard handover is one in which the channel in the source cell is retained and used for a while in parallel with the channel in the target cell. S2 : A soft handover ... and S2 is true. (C) Both S1 and S2 are true. (D) Both S1 and S2 are not true.

Last Answer : (D) Both S1 and S2 are not true.

Description : Which of the following statements is not true for Multi Level Feedback Queue processor scheduling algorithm? (A) Queues have different priorities. (B) Each queue may have different scheduling algorithm (C) ... to a queue (D) This algorithm can be configured to match a specific system under design

Last Answer : (C) Processes are permanently assigned to a queue

Description : Given the following two statements: S1: If L1 and L2 are recursively enumerable languages over ∑, then L1⋃L2 and L1⋂L2 are also recursively enumerable. S2: The set of recursively enumerable languages is countable. ... correct (C) Both S1 and S2 are not correct (D) Both S1 and S2 are correct

Last Answer : (D) Both S1 and S2 are correct

Description : The statements s1 and s2 are given as: s1: Context sensitive languages are closed under intersection, concatenation, substitution and inverse homomorphism. s2: Context free languages are closed under complementation, ... is not correct and s2 is correct. (D) Both s1 and s2 are not correct.

Last Answer : (B) s1 is correct and s2 is not correct.

Description : Which is the correct statement(s) for Non Recursive predictive parser? S1: First(α) = {t | α => * t β for some string β } => *tβ S2: Follow(X) = { a | S => * αXa β for some strings ... and S2 is correct. (C) S1 is correct and S2 is incorrect. (D) Both statements S1 and S2 are correct. 

Last Answer : (D) Both statements S1 and S2 are correct.

Description : Given the following statements: S1 : The grammars S→asb | bsa | ss | a and S→asb | bsa | a are not equivalent. S2: The grammars S→ss | sss | asb | bsa | λ and S→ss | asb | bsa | λ are equivalent. ... and S2 are correct (C) S1 is not correct and S2 is correct (D) Both S1 and S2 are not correct.

Last Answer : (A) S1 is correct and S2 is not correct.

Description : Consider following schedules involving two transactions: S1: r1(X); r1(Y); r2(X); r2(Y); w2(Y); w1(X) S2: r1(X); r2(X); r2(Y); w2(Y); r1(Y); w1(X) Which of the following ... . (3) S1 is not conflict serializable and S2 is conflict serializable. (4) Both S1 and S2 are not conflict serializable.

Last Answer : S1 is not conflict serializable and S2 is conflict serializable.

Description : Given the following statements: S1: Every context-sensitive language L is recursive. S2: There exists a recursive language that is not context sensitive. Which statement is correct? (A) S1 is not correct and S2 is ... (C) S1 is correct and S2 is not correct. (D) S1 is correct and S2 is correct.

Last Answer : (D) S1 is correct and S2 is correct. 

Description : Given the following statements : S1 : If L is a regular language then the language {uv | uϵL, vϵLR} is also regular. S2 : L = {wwR} is regular language. Which of the following is true ? (A) S1 is not ... S2 is correct. (C) S1 is correct and S2 is not correct. (D) S1 is correct and S2 is correct.

Last Answer : (C) S1 is correct and S2 is not correct.

Description : Given the following statements : S1 : SLR uses follow information to guide reductions. In case of LR and LALR parsers, the look-aheads are associated with the items and they make use of the left context available to ... (C) S1 is correct and S2 is not correct. (D) S1 is correct and S2 is correct.

Last Answer : (D) S1 is correct and S2 is correct.

Description : The …………….. policy segments the disks request queue into sub queues of the length N. A) SCAN B) C-SCAN C) N-Step SCAN D) FSCAN

Last Answer : C) N-Step SCAN

Description : Given the following statements :  S1 : The subgraph-isomorphism problem takes two graphs G1 and G2 and asks whether G1 is a subgraph of G2.  S2 : The set-partition problem takes as input a set S of numbers and ... S1 is P problem and S2 is P problem. (D) S1 is P problem and S2 is NP problem.

Last Answer : (B) S1 is NP problem and S2 is NP problem.

Description : A pushdown automation M = (Q, Σ, Γ, δ, q0, z, F) is set to be deterministic subject to which of the following condition(s), for every q ∈ Q, a ∈ Σ ∪ {λ} and b ∈ Γ (s1) δ(q, a, b) contains at most one ... ) must be empty for every c ∈ Σ (A) only s1 (B) only s2 (C) both s1 and s2 (D) neither s1 nor s2

Last Answer : (C) both s1 and s2

Description : Best-First search can be implemented using the following data structure. a) Queue b) Stack c) Priority Queue d) Circular Queue

Last Answer : c) Priority Queue

Description : Best-First search can be implemented using the following data structure A : Queue B : Stack C : Priority Queue D : Circular Queue

Last Answer : C : Priority Queue

Description : Best-First search can be implemented using the following data structure A : Queue B : Stack C : Priority Queue D : Circular Queue

Last Answer : A : Queue

Description : Best-First search can be implemented using the following data structure A : Queue B : Stack C : Priority Queue D : Circular Queue

Last Answer : C : Priority Queue

Description : Best-First search can be implemented using the following data structure A : Queue B : Stack C : Priority Queue D : Circular Queue

Last Answer : C : Priority Queue

Description : Which data structure conveniently used to implement BFS? a) Stacks b) Queues c) Priority Queues d) All of the mentioned

Last Answer : b) Queues

Description : Which of the following statement(s) is/are true with respect to software architecture? S1: Coupling is a measure of how well the things grouped together in a module belong together logically. S2: Cohesion is a measure of the ... ) Only S1 and S2 (2) Only S3 (3) All of S1, S2 and S3 (4) Only S1

Last Answer : Answer: 2

Description : If the queue is implemented with a linked list, keeping track of a front pointer and a rear pointer, which of these pointers will change during an insertion into a non-empty queue? (A) Neither of ... (B) Only front pointer changes (C) Only rear pointer changes (D) Both of the pointers changes

Last Answer : (C) Only rear pointer changes

Description : Consider the following statements related to compiler construction: I. Lexical Analysis is specified by context-free grammars and implemented by pushdown automata. II. Syntax Analysis is specified by regular expressions and implemented by ... Only l (2) Only ll (3) Both I and II (4) Neither I nor Il

Last Answer : Answer: 4

Description : 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 ... The popped item is ................... (1) A (2) B (3) F (4) G

Last Answer : Answer: 2

Description : ………… is very useful in situation when data have to stored and then retrieved in reverse order. A) Stack B) Queue C) List D) Link list

Last Answer : A) Stack

Description : ……………. Is a pile in which items are added at one end and removed from the other. A) Stack B) Queue C) List D) None of the above

Last Answer : B) Queue

Description : Consider the following operations performed on a stack of size 5: Push(a); Pop(); Push(b); Push(c); Pop(); Push(d); Pop(); Pop(); Push(e); Which of the following statements is correct? (A) Underflow occurs (B) Stack operations are performed smoothly (C) Overflow occurs (D) None of the above

Last Answer : (B) Stack operations are performed smoothly

Description : Consider a disk queue with request for input/output to block on cylinders  98, 183, 37, 122, 14, 124, 65, 67  in that order. Assume that disk head is initially positioned at cylinder 53 and moving ... and 252 cylinders (B) 640 and 236 cylinders (C) 235 and 640 cylinders (D) 235 and 252 cylinders

Last Answer : Answer: 236 and 208 cylinders Explanation: SSTF Initial head position =53 The closest queue to initial head position=65 head moves from 53 to 65=12 head moves from 65 to 67=2 head moves from 67 ... 122=24 head moves from 122 to 124=2 head moves from 124 to 183=59 Total head movement=208 

Description : Consider a disk queue with I/O requests on the following cylinders in their arriving order: 6,10,12,54,97,73,128,15,44,110,34,45 The disk head is assumed to be at cylinder 23 and moving in the direction ... . The disk head movement using SCAN-scheduling algorithm is: (1) 172 (2) 173 (3) 227 (4) 228

Last Answer : (2) 173

Description : If = = in the system of equations a 1 x + b 1 y + c 1 = 0 and a 2 x + b 2 y + c 2 = 0 Statement 1 : This is the condition for inconsistent equations Statement 2 : There exists infinitely many solutions ... statements are true ? e) S1 only f) S1 and S2 g) S1 and S3 h) S2 only Answer: (d) S2 o

Last Answer : h) S2 only

Description : If = = in the system of equations a 1 x + b 1 y + c 1 = 0 and a 2 x + b 2 y + c 2 = 0 Statement 1 : This is the condition for inconsistent equations Statement 2 : There exists infinitely many ... parallel Which of the above statements are true ? a) S1 only b) S1 and S2 c) S1 and S3 d) S2 only

Last Answer : d) S2 only

Description : To eliminate the inaccuracy problem in planning problem or partial order planning problem we can use ___________________ data structure/s. a) Stacks b) Queue c) BST (Binary Search Tree) d) Planning Graphs

Last Answer : d) Planning Graphs

Description : The advantage of …………….. is that they solve the problem if sequential storage representation. But disadvantage in that is they are sequential lists. A) Lists B) Linked Lists C) Trees D) Queues

Last Answer : B) Linked Lists

Description : Consider three CPU intensive processes P1, P2, P3 which require 20, 10 and 30 units of time, arrive at times 1, 3 and 7 respectively. Suppose operating system is implementing Shortest Remaining Time first (preemptive scheduling) ... end of Ready queue are not counted). (A) 3 (B) 2 (C) 4 (D) 5

Last Answer : (A) 3

Description : If coils 'R1-R2-R3' at the receiver of figure 'B' shown in the illustration turned opposite of those in the transmitter, what corrective action should be taken to have both turn in the same direction? EL-0092 A ... is needed. C. Interchange leads 'R1' and 'R3'. D. Interchange leads 'R2' and 'R3'.

Last Answer : Answer: C

Description : [31] With both S1 and S2 open, the core flux waveform will be [GATE 2009] A. a sinusoidal at fundamental frequency B. flat-topped with third harmonic C. peaky with third-harmonic D. none of these

Last Answer : B. Flat topped with third harmonic

Description : Which of the following statements is true? (1) The sentence S is a logical consequence of S1,..., Sn if and only if S1˄S2˄........˄Sn→S is satisfiable. (2) The sentence S is a logical consequence of ... S is a logical consequence of S1,..., Sn if and only if S1˄S2˄........˄Sn˄S is inconsistent.

Last Answer : The sentence S is a logical consequence of S1,..., Sn if and only if S1˄S2˄........˄Sn→S is valid.

Description : The processor uses the stack to keep track of where the items are stored on it this by using the: a. Stack pointer register b. Queue pointer register c. Both a & b d. None of these

Last Answer : a. Stack pointer register

Description : Consider an implementation of unsorted single linked list. Suppose it has its representation with a head and a tail pointer (i.e. pointers to the first and last nodes of the linked list). Given the ... the front node of the linked list. (D) Deletion of the last node of the linked list.

Last Answer : (D) Deletion of the last node of the linked list. 

Description : Given the following Series S1 and S2: Write the command to find the sum of series S1 and S2 -Technology

Last Answer : print(S1+S2)

Description : If coils 'R1-R2-R3' at the receiver of figure 'B' shown in the illustration turned opposite of those in the transmitter by design, what corrective action should be taken? EL-0092 A. Reverse the 60 Hz supply ... is needed. C. Interchange leads 'R1' and 'R3'. D. Interchange leads 'R2' and 'R3'.

Last Answer : Answer: B

Description : The direction of rotation of the winch shown in the illustration is changed by reversing the _____________. EL-0102 A. direction of current through the shunt field B. polarity of voltage at 'S1' and 'S2' C. direction of current through the armature D. polarity of voltage at 'L1' and 'L2'

Last Answer : Answer: C

Description : If coils 'R1-R2-R3' at the receiver of figure 'B' shown in the illustration were in 180 degree error with those of the transmitter, what corrective action should be taken? EL-0092 A. Reverse the 60 Hz ... is proper operation. C. Interchange leads 'R1' and 'R3'. D. Interchange leads 'R2' and 'R3'.

Last Answer : Answer: A

Description : If coil 'R1-R2' at the receiver of figure 'A' shown in the illustration were in 180 degree error with respect to that of the transmitter, what corrective action should be taken? EL-0092 A. No action is ... and 'R2'. C. Interchange connections 'S1' and 'S2'. D. Interchange connections 'S1' and 'S3'.

Last Answer : Answer: B

Description : If coil 'R1-R2' at the receiver of figure 'A' shown in the illustration turned opposite of that in the transmitter, what corrective action should be taken? EL-0092 A. No action is necessary as this is ... . C. Interchange connections to 'S1' and 'S2'. D. Interchange connections to 'S1' and 'S3'.

Last Answer : Answer: D

Description : If coil 'R1-R2' on the transmitter in figure 'A' shown in the illustration is turned 30 degrees clockwise, corresponding coil 'R1-R2' on the receiver should ____________. EL-0092 A. make coils 'S1 ... a higher voltage depending on the turns ratio D. align itself to the same position if free to move

Last Answer : Answer: D

Description : Derivation of Thiem's formula Q = 2 (s1 - s2)/2.3 log10 (r2/r1) is based on the assumption  (A) The aquifer is homogeneous, isotropic and of infinite depth and area  (B) The well is sunk ... (C) The flow lines are radial and horizontal, and the flow is laminar  (D) All the above 

Last Answer : (D) All the above 

Description : S1 and S2 are the draw downs in an observation well at times t1 and t2 after pumping. For  discharge Q and coefficient of transmissibility T, the relationship, is  (A) S2 - S1 = (2.3Q/ ) log10 (t2/t1)  (B) S2 - S1 ... - S1 = (2.3Q/4 ) loge (t2/t1)  (D) S2 - S1 = (2.3Q/4 ) loge (t1/t2

Last Answer : (B) S2 - S1 = (2.3Q/4 ) log10 (t2/t1)