C Ordered array. D Linear tree. Which data structure is needed to convert infix notation to postfix notation? In general, linked lists allow: A Insertions and removals anywhere. B Insertions and removals only at one end. C Insertions at the back and removals from the front.
A Deleting a node whose location in given B Searching of an unsorted list for a given item C Inverting a node after the node with given location D Traversing a list to process each node Answer: A. The extra key inserted at the end of the array is called a, …………….
A End key. B Stop key. C Sentinel. D Transposition. Consider that n elements are to be sorted. What is the worst case time complexity of Bubble sort? A characteristic of the data that binary search uses but the linear search ignores is the ……………… A Order of the elements of the list. B Length of the list. C Maximum value in list. D Type of elements of the list. In Breadth First Search of Graph, which of the following data structure is used?
The largest element of an array index is called its …………….. A lower bound. B range. C upper bound. D All of these. How many nodes in a tree have no ancestors? In order traversal of binary search tree will produce ……………. In binary heap, whenever the root is removed then the rightmost element of last level is replaced by the root. A It is the easiest possible way. B To make sure that it is still complete binary tree. C Because left and right subtree might be missing. D None of these Answer: B.
In order to get the contents of a Binary search tree in ascending order, one has to traverse it in ………… A pre-order B in-order C post order D not possible Answer: B. Which of the following sorting algorithm is stable?
Which data structure is used for implementing recursion? I want to prepare for my entrance exam. Pls send me all of the complete notes on computer science and mcq also. Thanks in advance. Its urgent send PDF in my email….
Sir can u plz send me notes on all subjects in computer science and mcqs of them. Plz its urgent am preparing for exams. Sir i request u to send data structure and algorithms mcq questions.
Urgently i need bcoz of drdo exam are near. I shall be very thankfull please sir its a request. Your email address will not be published. Which of the following is not the part of ADT description? A push, pop B pop, push C insert, delete D delete, insert 9. Which of the following is non-liner data structure? Herder node is used as sentinel in ….. Which of the following data structure is non linear type? Which of the following data structure is linear type?
State True of False. Match the following. A a-iii, b-ii, c-i B a-i, b-ii, c-iii C a-iii, b-i, c-ii D a-i, b-iii, c-ii State True or False. Which of the following is not the internal sort?
In a circular queue the value of r will be.. Which of the following statement is true? There is an extra element at the head of the list called a ………. A vertices, edges B edges, vertices C vertices, paths D graph node, edges A ……….. In general, the binary search method needs no more than ……………. Which of the following is not the type of queue? State true or false. State true of false. Which of the following data structures are indexed structures? Linear arrays B. Linked lists C.
Queue D. Stack Which of the following data structure store the homogeneous data elements? Arrays B. Records C. Pointers D. Lists Underflow B. A data structure where elements can be added or removed at either end but not in the middle is called … A. Operations on a data structure may be ….. Arrays are best data structures A.
Which of the following statement is false? Arrays are dense lists and static data structure. Data elements in linked list need not be stored in adjacent space in memory C. Linked lists are collection of the nodes that contain information part and next pointer. Which of the following data structure is non-linear type? The logical or mathematical model of a particular organization of data is called a ……… A Data structure B Data arrangement C Data configuration D Data formation Linear arrays are also called ……………….
Arrays are best data structures ………… A For relatively permanent collections of data. B For the size of the structure and the data in the structure are constantly changing C For both of above situation D For none of the above When does top value of the stack changes? Arrays are best data structures A for relatively permanent collections of data B for the size of the structure and the data in the structure are constantly changing C for both of above situation D for none of above situation Which of the following data structure is not linear data structure?
B Last node points to first node. C Time consuming D Requires more memory space A circular queue B random of queue C priority D dequeue In a priority queue, insertion and deletion takes place at ……………… A front, rear end B only at rear end C only at front end D any position The time complexity of quick sort is ………….. Which of the following is an application of stack? A finding factorial B tower of Hanoi C infix to postfix conversion D all of the above The data structure which is one ended is ……………… A queue B stack C tree D graph A list which displays the relationship of adjacency between elements is said to be A linear B non linear C linked list D trees Linear search is highly inefficient compared to binary search when dealing with: A Small, unsorted arrays B Small, sorted arrays C Large, unsorted arrays D Large, sorted arrays Answer: D A Deleting a node whose location is given B Searching of an unsorted list for a given item C Inserting a new node after node whose location is given D Traversing the list to process each node Answer: A A adapts to new computers B takes advantage of already sorted elements C takes input which is already sorted D None of these Answer: B Answer: B In a min-heap: A parent nodes have values greater than or equal to their Childs B parent nodes have values less than or equal to their Childs C both statements are true D both statements are wrong Answer: A D none of these Answer: B A fully parenthesised infix expression B postfix expression C partially parenthesised infix expression D more than one of the above Answer: A Answer: A Answer: C Answer: D B Shortest path of K edges from vertex Vi to vertex Vj.
D The last node at the bottom of a stack has a null 0 link. The worst case complexity of binary search matches with …………… A interpolation search B linear search C merge sort D none of the above Answer: B A binary tree in which if all its levels except possibly the last, have the maximum number of nodes and all the nodes at the last level appear as far left as possible, is known as A full binary tree B AVL tree C threaded tree D complete binary tree Answer: A B data collection should be in sorted form and but not equally distributed.
A queue data-structure can be used for …………… A expression parsing B recursion C resource allocation D all of these Answer: C A linked list is an ideal data structure because it can be modified easily. This means that editing a linked list works regardless of how many elements are in the list. Pushing and popping applies to the way data is stored and retrieved in a stack. On the other hand, a pop denotes data retrieval, and in particular, refers to the topmost data being accessed.
A linear search refers to the way a target key is being searched in a sequential data structure. In this method, each element in the list is checked and compared against the target key. The process is repeated until found or if the end of the file has been reached. The amount of memory to be allocated or reserved would depend on the data type of the variable being declared.
For example, if a variable is declared to be of integer type, then 32 bits of memory storage will be reserved for that variable. The heap is more flexible than the stack. However, the memory of the heap can at times be slower when compared to that stack. A postfix expression is an expression in which each operator follows its operands.
The advantage of this form is that there is no need to group sub-expressions in parentheses or to consider operator precedence. Data abstraction is a powerful tool for breaking down complex data problems into manageable chunks.
This is applied by initially specifying the data objects involved and the operations to be performed on these data objects without being overly concerned with how the data objects will be represented and stored in memory.
Assuming that the data to be inserted is a unique value that is, not an existing entry in the tree , check first if the tree is empty.
The selection sort is a fairly intuitive sorting algorithm, though not necessarily efficient. In this process, the smallest element is first located and switched with the element at subscript zero, thereby placing the smallest element in the first position. The smallest element remaining in the subarray is then located next to subscripts 1 through n-1 and switched with the element at subscript 1, thereby placing the second smallest element in the second position.
The steps are repeated in the same manner till the last element. In the case of signed numbers, the first bit is used to indicate whether positive or negative, which leaves you with one bit short.
With unsigned numbers, you have all bits available for that number. A binary tree can have a minimum of zero nodes, which occurs when the nodes have NULL values. Furthermore, a binary tree can also have 1 or 2 nodes. Dynamic data structures are structures that expand and contract as a program runs. It provides a flexible means of manipulating data because it can adjust according to the size of the data. Pointers that are used in linked list have various applications in the data structure.
Most declarations do, with the exemption of pointers. Pointer declaration does not allocate memory for data, but for the address of the pointer variable. Actual memory allocation for the data comes during run-time. When dealing with arrays, data is stored and retrieved using an index that refers to the element number in the data sequence. This means that data can be accessed in any order. In programming, an array is declared as a variable having a number of indexed elements.
The minimum number of queues needed in this case is two. One queue is intended for sorting priorities while the other queue is used for actual storage of data.
There are many types of sorting algorithms: quick sort, bubble sort, balloon sort, radix sort, merge sort, etc. Not one can be considered the fastest because each algorithm is designed for a particular data structure and data set. It would depend on the data set that you would want to sort. Stack follows a LIFO pattern. It means that data access follows a sequence wherein the last data to be stored when the first one to be extracted. Arrays, on the other hand, does not follow a particular order and instead can be accessed by referring to the indexed element within the array.
A dequeue is a double-ended queue. This is a structure wherein elements can be inserted or removed from either end. A bubble sort is one sorting technique that can be applied to data structures such as an array. It works by comparing adjacent elements and exchanges their values if they are out of order. A linked list typically has two parts: the head and the tail. Between the head and tail lie the actual nodes. All these nodes are linked sequentially.
Selection sort works by picking the smallest number from the list and placing it at the front. This process is repeated for the second position towards the end of the list. A 3 additions and 2 deletions. B 2 deletions and 3 additions. C 3 deletions and 4 additions. D 3 deletions and 3 additions. A Abstract level. B Implementation level. C Application level. A Binary search. B Insertion sort. C Radix sort.
D Polynomial manipulation.
0コメント