You are on page 1of 34
Digital oo CH =,.DATA srpucTuaes) Se Class-2 RG © Total Syllabus chapters 1500 Qns a5 lotro OCR Taye ofa lovel ayes 100. The result of evaluating the postfix 101. expression 5, 4, 6, +, *, 4, 9, 3, /, +, * is? HHH Spheveo 5, 4,6, +, *, 4,9, 3,/,4,*% wode Bd $OS0? 0 G 1) 600 2) 350 | x 3) 650 4) 58s Convert the following-infix expressions into its equivaleubpostfix expressions (A+B 4 D)/E~F+G 808 BMG Sesimo% od SoS S RSH S888 Srsyod (A+B AD)/(E-F)+G D (ABD A +EF-/G+) 2)(ABD+ AEF-/G+) 3) (ABD A +EF/-G+) 4) None of the mentioned 102. Convert the following Infix expression 103. to Postfix form using a stack x + y * z+ (Pp * + 4x) * 5, Follow usual precedence rule and assume that the expression is legal. 808 BS$& xGsters PE asaenod gdh Srsods Smsod x+y*z+Mt+y*s, PPSer SPAS Nein wwOoisos SOc SGSte SyayHssn wmSF08. 1) xyz*+pq*r+s*+ 2) xyz*+pq*r+s+* 3) xyz+*pq*r+s*+ 4) None of the mentioned Which of the following statement(s) about stack data structure is/are NOT correct? 1) Linked List are used for implementing Stacks 2) Top of the Stack always contain the new node 3) Stack is the FIFO data structure 4) Null link is present in the last node at the bottom of the stack APS Ger OoyWo Oo SodwPAS* DA BEKO wrth? 1) PEox w@xren Saar 008 ag aNBrAos athho& 2) BE BS IS SF SE aotewod 38) as 58 FIFO der Doyo 4) RE OHSS OX) O58 SEE Kreg OOS actx0& 104. Which of the following is not an inherent application of stack? 1) Reversing a string 2) Evaluation of postfix expression 3) Implementation of recursion 4) Job scheduling 808 rE DB xs Bath, aPQrds weirssso sro? 1) RoR 8S8y0R 2) SHRE) SpGStieo Ent, LarersosSo 3) QSorH)S Oden 4) ash BsrDoh 105. The type of expression in which operator succeeds its operands is? ‘1 Infix Expression a 2) Prefix Expression \' 3) Postfix Expression NO 4) None of the mentione oO SOE TD SLIRLX ee 0 Bw SghSe 880? we 1) AG) ASste0 605 aes S588te0 8) BPRS) Si 4) SEO a8 S&H 106. Ifthe ele “A”, “B”, “C”'and “D” are ita-stack and are deleted one at hat is the order of removal? 1)ABCD 2) DCBA. Oras 4) ABDC “A”, “BY, “C” S0cho"D" Sarees as pet 0D, 2320 TAS, FoAod io 2526? 1) DORE 2) BRAD 8) 800 A) DdBD 107. 108. 109. A linear list of elements in which deletion can be done from one end (front) and insertion can take place only at the other end (rear) is known asa?- 1) Queue ~*” 2) Stack’ 3) Tree" '* 4) Linked list | BS OSS (Kot) h08 ‘Fotos Iadorfo Shrosre Ankh S6e arder socio Sayovto SPS DSL (BLY) SHS atorosoB? 1) &y 2) 3) Bey . AD 808 ade The data structure required for Breadth First Traversal on a graph is? ~ 1) Stack 2) Array 3) Queue ~ 4) Tree (PSE Stier) Ssh ErSHHY ossiHs der Doy0? i ‘ ARE 0B o> 2 a A queue is a? 1) FIFO (First In First Out) list 2) LIFO (Last In First Out) list 3) Ordered array 4) Linear tree 110. 111. Sas tory wos)? 1) Hg (HQ QO YQ wwxyt5) xBox 2) Hae (o§ mae Og e9%e5) exBexe 8) BBO aSBowry 4) 5NGE Bex In Breadth First Search of Graph, which of the following data structure is peed? 1) Stack 2) Queue 3) Linked list 4) None of the mentioned (PH Booky Ser) Swid Fuss, 808 rbd 28 Fer Qoymo asidrAoisroeob? 1) && 2) Sor 3) DoS ader 4) SOA 06 de If the elements “A”, “B”, “C” and “D” are placed in a queue and are deleted one at a time, in what order will they be removed? “A”, “B", “C” SOdio “D” Sarosrexo Srgs 600, 286 Soh, oD d (Sd. Sohosiatsron? 4 _DABCD 2)DCBA "SDCAB . AABDC 112. A data structure in which elements can 113. Ss be inserted or deleted at/from both the ends but not in the middle is? 1) Queue ; 2) Circular queue hs “& 3) Dequeue ~ & 4) Priority queue . Bors NSY Xoo8 / Hxge* SO 50% FLpisiio Sao Pohosio Ber 1) Soy esd Sarg 3) Bs oo Sosy Sg Queues se sere’ major role in — 1) Simula n of recursion. 2) son of arbitrary linked list 3) lation of limited resource allocation All of the mentioned 209 (SGPS ws SPADPO “Ty HSorays wxrsbeo 2) OSOX wrxdours ade Gos) koto 3) SOS Stoo Seran0%y oxoSbeo . 4) SESH 114. Which of the following is not the type of queue? 1) Ordinary queue 2) Single ended queue 3) Circular queue 4) Priority queue 808 wSE OB Sry S¥o ret? 1) Sardses Sarg 2) BAS Do& Soy 3) Yrs Korg 4) orsyer Soy 115. A linear collection of data elements where the linear node is given by means of pointer is called? 1) Linked list 2) Node list 3) Primitive list 4) None of the mentioned onowS argor H2GHE SE adgods der Srowe Got, L6Y ideo woerty? 1) O0§ arder 2) SE wder 3) BBX. er2ese 4) DEYHA 8 Sex 116. Consider an implementation of unsorted singly linked list. Suppose it has its representation with a head pointer only, Given the representation, which of the following operation can be implemented , in O(1) time? i) Insertion at the front of the linked list ii) Insertion at the end of the linked list iii) Deletion of the front node of the linked list iv) Deletion of the last node of the linked list ‘ (SioaQsoosa ROAST O0§ dar wxoenio SOKBodsod. 98 WE SonowSs® Sr sa PBARso SOKA wxooaro, FPBIg so SHEA, 80a mds? 28 OL) Skodhods widen Bebb? NO08 Sobaas der Snort aris Tayositio ii) 008 Fahaks der ns0E® TAoisio lif) 008 Bomads ader Ankh Sot SH Ankh Sonos iv) 008 Schnas ardor wk O60 FE Gok Sohoy- 1) land Il 2) Land Ill 3) I, and Ill 4) I, Iland IV 117. In linked list each node cfstain minimum of two fields. On field is data field to store the data se field is? 1) Pointer to character ©) 2) Pointer to integer S~ 3) Pointer to mee 4) Node dof warty SEE SA¥o Boe beg Boeron, deg Bohara8 ak bg Gen 56 bape ; 8 Aran0t& ae SPov0dS w Se SPon0t& A) SE 118. What would be tlie asymptotic time complexity to add a node at the end of singly linked list, if the pointer is initially pointing to the head of the list? Fon0v6 Snkef slew Ankh Sop$ dvds, 28 Do§ ade osod SEX sBosaras SROYE Sich SoBYs O06? 1) O(A) 2) Of)» 3) (a) 4) (1) 119. What would be the asymptotic time complexity to add an element in the linked list? 008 Dobos dard ak serosd s Gowers - @BOBE Stead 4o8Gs Sar8? 120. 1)0Q) 2) O~M) 3) O~2) 4) None of the mentioned The concatenation of two list can performed in O(1) time. Which of the following variation of linked list can be used? , 1) Singly linked list 2) Doubly linked list 3) Circular doubly linked list 4) Array implementation of list 121. Bow ada Ew soltisrea O (1) sxocooe* Bobseyy, DoF ls Gok 808 wb 24 adSrAosschy? 1) BOAS Oo§ OY 2) BQ0% O08 adear 3) Heed Boy Do& erder 4) ber Env (23 vse What kind of linked list is best to answer question like “What is the item at position n?” | 1) Singly linked list 2) Doubly linked list 3) Circular linked list 4) Array implementation of linked list “spSo 1 SY aX) oso 26?” S06 Gays Sérqrso axcoras 2 28g8 S008 erdar aSiro. 1) DoAS D8 ag 2) Bow BoB arder 8) Hess wxrsogs adr 4) 808 wde Ant (88 wx 122. 123. Linked lists, are not suitable to for the implementation, of? 1) Insertion. sort, | sit 2) Radix sort al 3) Polynomial manipulation & -~O 4) Binary search . . ; VY Bo§ erdores wivent snd gB? : 1) Sod Caste: —~O% 2) o&§) SxoahsSeo we 3) misoS8 ertosorto\ 4) Bx8 865 > Linkéd list iggonsidered as an example of type of memory allocation. 1) Dyn oe 2)S 3)XCompile time 4) None of the mentioned . DOG POT oc eseees bSo Sisob Zerov0%ys amrsSeorr S6KBosatood. 1) SDE 2) SE 3) SopS Sxodbo 4) HeyKys 24 Sem eee 7, 124, 125. In Linked List implementation, a node carries information regarding 1) Data 2) Link - 3) Data and Link 4) None of the mentioned DoF OH sophohAss, ak SE Somogoos HAwerorhy SOA daoiwod _ 1) Gee 2) BoB 3) Ber LOohwo DoE 4) SEHS.O8 S&H Linked list data structure offers considerable saving in 1) Computational Time 2) Space Utilization 3) Space Utilization and Computational Time : ' 4) None of the mentioned |... ' 126. Which of the following points is/are true about Linked List data structure when it is compared with array 1) Arrays have better cache locality that can make them better in térms of performance +3, =; 2 2) Itis easy-to-insert,and. dete elements »in, Linked List.- ; «> x 3) -Random acces: not allowed in a typical imple eration of Linked Lists 4) All of the ioned,- eae ae Do§ O§ dep ges %800 BoB a 1 Deo / Qwo 1) Beaded DWAS oH SOS) KOA aoeron, SLB YGorv wD. Hirosodeow 2) B08 POESD, CoPor Myosio HBaio | PoAosto mofo . vol os » 8) O08 where Gok onan wots Snes ODMBOSHEM 4) DOYS + 127. Which of the following ‘sorting - algorithms can be used to sort a random linked list. with minimum time complexity? 1) Insertion Sort 2) Quick Sort 3) Heap Sort 4) Merge Sort 128. BOS Kshah BoSHsS® cored YY wriiowrs dare SkHaQvooderns 808 HQoh wélosood da SBBPMOBS LY)? 1) Sos Smagsces 2) EPS CHaQvoes 3) H%y SxaGsGeo 4) MASmHaby BexaGsses In the worst case, the number of comparisons needed to search a singly linked list of length n for a given element is BY Sodidyod*, ahs Srose Sic &xH n Gok OES exons da ShoswnsS ek0Qs HdSo Sogys 1)log2n 2) n/2 3) log2n-1 4)n 129, 130. Given pointer to a node X in a singly linked list. Only one pointer is given, pointer to head node is not given, can we delete the node X from given linked , list? 1) Possible if X is not last node 2) Possible if size of linked list is even 3) Possible if size of linked list is odd 4) Possible if X is not first node 28 Oo dere? SEX § Son sihndod. aS Son0vd Sn[sd adgohoa, wE SEH SromonS axyntde, ahs Oo rer Ho8 SE X % Pohosioxsr? 1) X 086 SE Syas Sesh 2) Do§ arler SOsrw SérSorr 808} apes 3) Do§ erher SOxirc0 Bd wows sega 4) X Bnd8 SE wkss aregad You are given pointers to first and last nodes of a singly linked list, which of the following operations are dependent on the length of the linked list? 1) Delete the first element 2) Insert a new element as a first element 3) Delete the last element of the list 4) Add a new element at the end of the list ¥ 131. aS Do§ ender nk SwS woo O66 S Goth ah Fonowty axyouron, $08 hd 2 O08 Dodds lar Gok, PUSH eH dotmoh? 1) SoS Sosa, SFohorseéo 2) SE srosrd S58 Lrovorr Fajosseo 3) apder Gs, DS sromty Soise 4) we. DSS SF roms Bosso Which of the followiig is false about a doubly linked li: 1) We can nen in both the directions | 2) It requirestm ore space than a singly linked list 3) rane Sertion and deletion of a node bit longer aoe oe Se of the mentioned 0% O08 BRS are Oo 808 ards 28 8%)? 1) Déiw Bow H¥od* WANS Dadsehy 2). B08 28 DoS wder S08 IMS $o0 wSx8o 3) SE Gs, Posa-D8 shOaw Kohosard8 SoBo Hxrdbo Hwshod 4) BEW!S a8 Sem eee at uy 133. oo 2. What is a memory efficient double linked list? 1) Each node has only one pointer to traverse the list back and forth 2) The list has breakpoints for faster traversal | 3) An auxiliary singly linked list acts as a helper list to traverse through the doubly linked list - 4) None of the mentioned Bard Do§ der Gok SYsosPS DHE OOH? 1) GB SES wders Snot SHEH BROS 28 Fano aotmod 2) rderd® Shore ScirBosards as Sramoth eNO 3) SFE BOA OOF OF SHo% Oo§ OY aye GcsrBosards VAS aPPevrv SIsxQO 4) BOYS O6 Se How do you calculate the pointer difference ina memory efficient double linked list? 1) head x or tail 2) pointer to previous node x or otter to next node 134. 3) pointer to previous node — pointer to next node 4) pointer to next node - pointer to previous node Sod, BeYSoSHS Led DOF arers! Sronow0h HOH Der BSo0r0? 1) So x &Y 2) SwmHd FE Sonob5 Sse sx x SPav0k5 38) SwHSH HEH Tonos - SeHS6 SES Fon0e5 4) StS TEL Sroot6 - Sms SE Fon0b5 What differentiates a circular linked list from a normal linked list? 1) You cannot have the ‘next’ pointer point to null in a circular linked list 2) It is faster to traverse the circular linked list 3) You may or may not have the ‘next’ pointer point to null in a circular linked list 4) All of the mentioned Petes OF rds Lod J HSS exsogrs berm 28 Sv Bob? NOES CHNoGs ards Sxyorr osero8 Dd ‘SSO’ FronotE Fans 'sorstortseo 2) Qed Sows ards crotso Sorr - 80008 5 38) HSS: ox Sos arderd? Hw ‘Seoso’ ~ Fon05 FowvolS wxsorr ows Sor Soko HS) 4) Sey _SY, ; 135. Which of the following application makes use of a circular linked list 1) Undo operation in a texteditor 2) Recursive function calls 3) Allocating cRynto resources 4) All of nentioned | 80 By 2B HRPS eksoms wows pbkcroiiocmers eeu * 1) BH aBobE* SKS wy Sado® 2) QSOS )S GoXS HG) 3) SXHo% CPU A Seroworseéo 4) DESAY 136. Which of the following is false about a circular linked list? 1) Every node has a successor 2) Time complexity of inserting a new node at the head of the list is O(1) 3) Time complexity for deleting the last node is O(n) 4) None of the mentioned HESS ohvioms ele 000 So whe 28 Soy? 1) 68 SES PSH sosre / 2) erber Enh So 55 GF SES Pyoid swab 60898 O(1) 3) 056 SEH Fohod Smad. soggs O(n) 4) BARS 26 eH Ow ee ee aa! 137. Consider a small circular linked list. How to detect the presence of cycles in this list effectively? 1) Keep one node as head and traverse another temp node till the end to check io .eifits ‘next points to head 2) Have fast and slow.pointers with the fast pointer advancing two nodes at a time and slow pointer advancing by one node at a time 3) Cannot determine, you, have to pre- define if the list contains cycles 4) None of the mentioned aX) Hass Sxsogns erdarx S6iBoiiod. ov erberd dis 2080 der SHYsosorr Gow? 1) aS SEX Sot A008 Hbaini Hrs Boh SEX 248 S8% [SaiorBod''erd ‘$hoS8 Framolg SORs Saav JS*-HdH Sood 2) FH dravob6 2850 Got SX “snots BLBELO HOw ad Sedbos a¥ SE ayo BxYBrP Sronots Smore orto axe Siforr SoOoho BSYArP Sramowyed SOA aoto8 8) AYonosdim, arderd® sigrew 408 aot x0 AKQowrO 4) BEYQS 46 Se 138. Which of the following real world scenarios would you associate with a stack data structure? 1) piling up of chairs one above the other 2) people standing in aline to be serviced at a counter 3) offer services based on the priority of the customer 4) all of the mentioned Si (G08 FSS Gdod days? dnt HE der Noy08 eXnoda? 1) 2&POESE HS Sdn Sadeso 2) SowbS WS Baars 2S Bio Doak ety Geen 3) SHHE Booey Pardge egiéor péiexs eohoso& 4) SE xxXysd) 139 140. . What does ‘stack underflow’ refer to? 1) accessing item from an undefined stack 2) adding items to a full stack 3) removing items from an empty stack 4) index out of bounds exception? ‘EE wotSR® GAO vr N%yoa? N > 1) ABWPosatsa HE od comQaeas Babtso 2) HG BE wowoxr so 8) arb 5 sod SiggesWonoscio 4) sehen srsstonos BSR Rwds What happen: when you pop from an empty stack le implementing using the Stack ADF'in Java? 1) Undefigfet error 2) Co r displays a warning 3) pty Stack Exception is thrown nb sack Exception is thrown BoE HE ADT d a8Grhod othe THe Soto arb SPS 08 SS Taszyt Om atoiosoob? 1) DEgQDosaeso B30 2) Sopot as BraOss SsgQod 3) arb FE OHS OOdchathsod 4) No Stack Exception dvOSacbaroeood 141. ‘Array implementation of Stack is not dynamic’, which of the following statements supports this argument? 1) space allocation for array is fixed and cannot be changed during run-time 2) user unable to give the input for stack operations © 3) aruntime exception halts execution 4) all of the mentioned: PE Gakh, BS omen ASHE seh’, ds Bod aridod® DO & wish MGs ayo? 1) 6d So Ho SercmosH SOKpPoisaoh Octo 65- abe aoe yee 2) APE SLORY So MGeiicrw aXyiS sige 3) S§BH ASSono%y wxenk VARS 4) DOSY 142. Which of the following statements are 143, correct with respect to Singly Linked List(SLL) and Doubly Linked List(DLL)? 1) Complexity of Insertion and Deletion at known position is O(n) in SLL and Od) in DLL 2) SLL uses lesser memory per node than DLL 3) DLL has more searching power than SLL 4) All of the mentioned Sof} Oo§ OF OSISIS) HOcko vad OOF OF (Gd525) & SomoGod SoasrSS* 24 4840? 1) BORS BPSoS PR oso H6din Fohosso Envy 4o8Hs O(n) 6 SLL H8a O(1) & . DLL 2) aBATIS BISA SoH SE Shy Hwbo BHBPADQB 3) ABAGAS So BISISH DKS 4°45 XB a8 4) DESY, What does ‘stack overflow’ refer to? 1) accessing item from an undefined stack 2) adding items to a full stack 3) removing items from an empty stack 4) index out of bounds exception 144. * can be used for parenti s matching? ‘PE 2S5R% Joo xarNxy08? 1) ASosaseoa PE Ho wos) aay Sabzso 2) BO PE wowor HBorseso 3) a8 5 So8 Som SroAosso < 4) Sten dSsfonos Ho8 drag CG Which of the following ructures 1) n-ary tree x» 2) queue AS 3) priority q 4) stack . < Hotshss O8OS Sio Soh TSE 28 der noyned esdimnowsiy? katy Sey 2) Sg Sees Ss 4) 8 : 145. inimum number . of queues. to implement stack is phy widen Dawns $00 Srjeo 13 24 ; 3) 1 Ayi2> eioge 146, 147. With what data structure can. a priority queue be tmplomenfed?)' or 1) Array sf) Bt Seok 2) List : i 3) Heap fate 4) All ofthe mentioned °° '. © Bar Doyswod® Hrargs sory oxen Dabs? Doe - no 2) epee." 3) &%) ~ + 4) HOSA” Which of the following ‘is: not an application of priority pars 1) Huffman codes *.’.” 2) Interrupt handling i in operating een 3) Undo operation in text editors: : 4) Bayesian spam filter 808 PEE 2B Grordys Sy Boy a se? 1) HHS Soderen 2) SiBBR VYSHS® ashoRoh wossorto 8) BE) DOYS? oHIAS Sey Dados 4) adbwabS ay& Hob 148. What is not a disadvantage of priority 149. scheduling in operating systems? 1) A low priority process might have to wait indefinitely for the CPU 2) If the system crashes, the low priority systems may be lost permanently 3) Interrupt handling 4) None of the mentioned esd8oh RQSHS Srardgd UérsDolh Boesy Gakros OHS? 1) SEs Srorxps Ko GiSa CPU Sho NLSAXorr do BOO) doén0h 2) RSD (SR won, SEYS SHRS. Ko Shigeo wssorr SH \Seyy 3) woserddo SOAS DSgores 4) DEWRHS.d4 Se What are the advantages of priority queues? 1) Easy to implement’ : 2) Processes with different priority can be efficiently handled, oe 3) Applications with differing require- ments oe 4) All of the mentioned 150. What is a dequeue? 1) A queue with insert/delete defined for both front and rear ends of the queue 2) A queue implemented with a doubly linked list 3) Aqueue implemented with both singly and doubly linked lists 4) None of the mentioned x; 08 O06? 1) Sry Snot shBcto Sok Oso OtgWodS SFeyox% / Pohor wry 2) Bow O08 wderd® try wien adadod 3) ad Socio Bho} omiiogrs arberos® ose ScvoaBs korg 4) BEW_E Ob Seo 58)354)2-55)3-56)2_-57)3_—-58H)2_-dSH1L «GHZ 63)1 641 654 664 673 68)3 694 74 | 73)3 744. 75)3 764 TH4 78)4 794 82 | 83)1 84)4 854 864 872 88)4 894 91 | 93)3 942 95)4 96)3 971 98)3 992 102 | 103) 3 104)4 105)3 1062 107)1 108)3 1091 112 | 113)3 1142 1151 1162 1173 1183 1192 1293 | 123)1 124)2 125)3 1264 127)4 128)4 1291 1393 | 133)2 134)3 185)3° 136)2 137)2 138)1 139)3 140)3 143)2 144)4 145)3 146)4 147)3. 148)3 149)4 150)1 . SHARNE s) ja | i

You might also like