Loading
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI, PUNE – 45Subject : Data Structure Class : S.Y. BBA(CA)Prof . S. B. Potadar www.dacc.edu.inUnit 1 : Basic Concept and Introduction to Data structure1. Which of these best describes an array?a) A data structure that shows a hierarchical behaviourb) Container of objects of similar typesc) Arrays are immutable once initialisedd) Array is not a data structure2. How do you initialize an array ?a) int arr[3] = (1,2,3);b) int arr(3) = {1,2,3};c) int arr[3] = {1,2,3};d) int arr(3) = (1,2,3);3. When does the ArrayIndexOutOfBoundsException occur?a) Compile-timeb) Run-timec) Not an errord) Not an exception at all4. Which of the following concepts make extensive use of arrays?a) Binary treesb) Scheduling of processesc) Cachingd) Spatial locality5. What are the advantages of arrays?a) Objects of mixed data types can be storedb) Elements in an array cannot be sortedc) Index of first element of an array is 1d) Easier to store elements of same data type6. What are the disadvantages of arrays?a) Data structure like queue or stack cannot be implementedb) There are chances of wastage of memory space if elements inserted in an array are lesser than theallocated sizec) Index value of an array can be negatived) Elements are sequentially accessed
Page 1
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI, PUNE – 45Subject : Data Structure Class : S.Y. BBA(CA)Prof . S. B. Potadar www.dacc.edu.in7. Assuming int is of 4bytes, what is the size of int arr[15];?a) 15b) 19c) 11d) 608. In general, the index of the first element in an array is __________a) 0b) -1c) 2d) 19. Elements in an array are accessed _____________a) randomlyb) sequentiallyc) exponentiallyd) logarithmically
Page 2
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI, PUNE – 45Subject : Data Structure Class : S.Y. BBA(CA)Prof . S. B. Potadar www.dacc.edu.inUnit : Stack and Queue10. Process of inserting an element in stack is called ____________a) Createb) Pushc) Evaluationd) Pop11. Process of removing an element from stack is called __________a) Createb) Pushc) Evaluationd) Pop12. In a stack, if a user tries to remove an element from empty stack it is called _________a) Underflowb) Empty collectionc) Overflowd) Garbage Collection13. Pushing an element into stack already having five elements and stack size of 5, then stack becomesa) Overflowb) Crashc) Underflowd) User flow14. Entries in a stack are “ordered”. What is the meaning of this statement?a) A collection of stacks is sortableb) Stack entries may be compared with the ‘<‘ operationc) The entries are stored in a linked listd) There is a Sequential entry that is one by one15. . Which of the following applications may use a stack?a) A parentheses balancing programb) Tracking of local variables at run timec) Compiler Syntax Analyzerd) Data Transfer between two asynchronous process16. Consider the usual algorithm for determining whether a sequence of parentheses is balanced.The maximum number of parentheses that appear on the stack AT ANY ONE TIME when thealgorithm analyzes: (()(())(())) are:a) 1b) 2c) 3
Page 3
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI, PUNE – 45Subject : Data Structure Class : S.Y. BBA(CA)Prof . S. B. Potadar www.dacc.edu.ind) 4 or more17. Consider the usual algorithm for determining whether a sequence of parentheses is balanced.Suppose that you run the algorithm on a sequence that contains 2 left parentheses and 3 rightparentheses (in some order).The maximum number of parentheses that appear on the stack AT ANY ONE TIME during thecomputation?a) 1b) 2c) 3d) 4 or more18. What is the value of the postfix expression 6 3 2 4 + – *?a) 1b) 40c) 74d) -1819. Here is an infix expression: 4 + 3*(6*3-12). Suppose that we are using the usual stack algorithm toconvert the expression from infix to postfix notation.The maximum number of symbols that will appear on the stack AT ONE TIME during theconversion of this expression?a) 1b) 2c) 3d) 420. The postfix form of the expression (A+ B)*(C*D- E)*F / G is?a) AB+ CD*E – FG /**b) AB + CD* E – F **G /c) AB + CD* E – *F *G /d) AB + CDE * – * F *G /21. The data structure required to check whether an expression contains balanced parenthesis is?a) Stackb) Queuec) Arrayd) Tree22. What data structure would you mostly likely see in a non recursive implementation of a recursivealgorithm?a) Linked Listb) Stack
Page 4
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI, PUNE – 45Subject : Data Structure Class : S.Y. BBA(CA)Prof . S. B. Potadar www.dacc.edu.inc) Queued) Tree23. The process of accessing data stored in a serial access memory is similar to manipulating data on a________a) Heapb) Binary Treec) Arrayd) Stack24. The postfix form of A*B+C/D is?a) *AB/CD+b) AB*CD/+c) A*BC+/Dd) ABCD+/*25. Which data structure is needed to convert infix notation to postfix notation?a) Branchb) Treec) Queued) Stack26. The prefix form of A-B/ (C * D ^ E) is?a) -/*^ACBDEb) -ABCD*^DEc) -A/B*C^DEd) -A/BC*^DE27. What is the result of the following operation?Top (Push (S, X))a) Xb) X+Sc) Sd) XS28. The prefix form of an infix expression (p + q) – (r * t) is?a) + pq – *rtb) – +pqr * tc) – +pq * rtd) – + * pqrt
Page 5
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI, PUNE – 45Subject : Data Structure Class : S.Y. BBA(CA)Prof . S. B. Potadar www.dacc.edu.in29. . Which data structure is used for implementing recursion?a) Queueb) Stackc) Arrayd) List30. The result of evaluating the postfix expression 5, 4, 6, +, *, 4, 9, 3, /, +, * is?a) 600b) 350c) 650d) 58831. Convert the following infix expressions into its equivalent postfix expressions(A + B ⋀D)/(E – F)+Ga) (A B D ⋀ + E F – / G +)b) (A B D +⋀ E F – / G +)c) (A B D ⋀ + E F/- G +)d) (A B D E F + ⋀ / – G +)32. Convert the following Infix expression to Postfix form using a stackx + y * z + (p * q + r) * s, Follow usual precedence rule and assume that the expression is legal.a) xyz*+pq*r+s*+b) xyz*+pq*r+s+*c) xyz+*pq*r+s*+d) xyzp+**qr+s*+33. Which of the following statement(s) about stack data structure is/are NOT correct?a) Linked List are used for implementing Stacksb) Top of the Stack always contain the new nodec) Stack is the FIFO data structured) Null link is present in the last node at the bottom of the stack34. . Consider the following operation performed on a stack of size 5.Push(1);Pop();Push(2);Push(3);Pop();Push(4);Pop();Pop();Push(5);After the completion of all operation, the number of elements present in stack are
Page 6
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI, PUNE – 45Subject : Data Structure Class : S.Y. BBA(CA)Prof . S. B. Potadar www.dacc.edu.ina) 1b) 2c) 3d) 435. Which of the following is not an inherent application of stack?a) Reversing a stringb) Evaluation of postfix expressionc) Implementation of recursiond) Job scheduling36. The type of expression in which operator succeeds its operands is?a) Infix Expressionb) Prefix Expressionc) Postfix Expressiond) Both Prefix and Postfix Expressions37. Assume that the operators +,-, X are left associative and ^ is right associative.The order of precedence (from highest to lowest) is ^, X, +, -. The postfix expression for the infixexpression a + b X c – d ^ e ^ f isa) abc X+ def ^^ –b) abc X+ de^f^ –c) ab+c Xd – e ^f^d) -+aXbc^ ^def38. If the elements “A”, “B”, “C” and “D” are placed in a stack and are deleted one at a time, what is theorder of removal?a) ABCDb) DCBAc) DCABd) ABDC39. A linear list of elements in which deletion can be done from one end (front) and insertion can takeplace only at the other end (rear) is known as a ?a) Queueb) Stackc) Treed) Linked list40. The data structure required for Breadth First Traversal on a graph is?a) Stackb) Arrayc) Queue
Page 7
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI, PUNE – 45Subject : Data Structure Class : S.Y. BBA(CA)Prof . S. B. Potadar www.dacc.edu.ind) Tree41. A queue follows __________a) FIFO (First In First Out) principleb) LIFO (Last In First Out) principlec) Ordered arrayd) Linear tree42. Circular Queue is also known as ________a) Ring Bufferb) Square Bufferc) Rectangle Bufferd) Curve Buffer43. If the elements “A”, “B”, “C” and “D” are placed in a queue and are deleted one at a time, in whatorder will they be removed?a) ABCDb) DCBAc) DCABd) ABDC44. A data structure in which elements can be inserted or deleted at/from both the ends but not in themiddle is?a) Queueb) Circular queuec) Dequeued) Priority queue45. A normal queue, if implemented using an array of size MAX_SIZE, gets full whena) Rear = MAX_SIZE – 1b) Front = (rear + 1)mod MAX_SIZEc) Front = rear + 1d) Rear = front46. Queues serve major role in ______________a) Simulation of recursionb) Simulation of arbitrary linked listc) Simulation of limited resource allocationd) Simulation of heap sort47. Which of the following is not the type of queue?a) Ordinary queueb) Single ended queue
Page 8
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI, PUNE – 45Subject : Data Structure Class : S.Y. BBA(CA)Prof . S. B. Potadar www.dacc.edu.inc) Circular queued) Priority queueUnit : Linked List48. A linear collection of data elements where the linear node is given by means of pointer is called?a) Linked listb) Node listc) Primitive listd) Unordered list49. Consider an implementation of unsorted singly linked list. Suppose it has its representation with ahead 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 listii) Insertion at the end of the linked listiii) Deletion of the front node of the linked listiv) Deletion of the last node of the linked lista) I and IIb) I and IIIc) I, II and IIId) I, II and IV50. In linked list each node contain minimum of two fields. One field is data field to store the datasecond field is?a) Pointer to characterb) Pointer to integerc) Pointer to noded) Node51. What would be the asymptotic time complexity to add a node at the end of singly linked list, if thepointer is initially pointing to the head of the list?a) O(1)b) O(n)c) θ(n)d) θ(1)52. What would be the asymptotic time complexity to insert an element at the front of the linked list(head is known)?a) O(1)b) O(n)c) O(n2)
Page 9
- DNYANSAGAR ARTS AND COMMERCE COLLEGE, BALEWADI, PUNE – 45Subject : Data Structure Class : S.Y. BBA(CA)Prof . S. B. Potadar www.dacc.edu.ind) O(n3)53. What would be the asymptotic time complexity to find an element in the linked list?a) O(1)b) O(n)c) O(n2)d) O(n4)54. What would be the asymptotic time complexity to insert an element at the second position in thelinked list?a) O(1)b) O(n)c) O(n2)d) O(n3)55. The concatenation of two list can performed in O(1) time. Which of the following variation of linkedlist can be used?a) Singly linked listb) Doubly linked listc) Circular doubly linked listd) Array implementation of list56. What kind of linked list is best to answer question like “What is the item at position n?”a) Singly linked listb) Doubly linked listc) Circular linked listd) Array implementation of linked list57. Linked lists are not suitable to for the implementation of?a) Insertion sortb) Radix sortc) Polynomial manipulationd) Binary search58. Linked list is considered as an example of ___________ type of memory allocation.a) Dynamicb) Staticc) Compile timed) Heap59. In Linked List implementation, a node carries information regarding ___________a) Datab) Link
Page 10
Download this file to view remaining 28 pages
Related documents:
- Psychology (Paper II) 2017 Question Paper - Question Paper
- Urban Sociology - Questions with answers - Question Bank
- GETTING STARTED WITH TALLY - EBA - Notes
- Data Mining MCQs - MCQ
- Physics (Paper I) 2017 Question Paper - Question Paper
- Statistics (Paper III) 2016 Question Paper - Notes
- Indirect Tax GST Practice MCQ Questions - MCQ
- Agricultural Engineering Paper II - Question Paper
- History of English Language and Phonetics MCQs - MCQ
- HISTORY II 2020 question paper - Question Paper
- Engineering Graphics Nov Dec 2014 Question Paper - Question Paper
- Agricultural Engineering Paper I - Question Bank
- Sanskrit - Prose,Vrutha,Alankara,Theories of Poetics & Grammar MCQs - MCQ
- Microeconomics-II - Question Bank
- Logarithms using Log table - Notes
- Web Technologies Solved MCQs - MCQ
- Model Questions for M Com - Financial Management - Question Paper
- Business Intelligence - Practice MCQ Questions - MCQ
- Element of Company Law - MCQ
- Object Oriented Software Engineering Solved MCQs - MCQ