Question:* External sorting is a way of
Answer: • sorting data that is too large to fit into RAM
Question:* Collision resolution is not required if a hash function is perfect
Answer: • True
Question:* The path length from root to farthest leaf node is the ______ of the tree.
Answer: • Depth
Question:* What is the minimum number of queues needed to implement a priority queue?
Answer: • Two
Question:* Which is a collection of distinct unordered elements with a common type and no duplicates?
Answer: • Set
Question:* What is the data structure used to perform recursion?
Answer: • Stack
Question:* Which of the following data structures is efficient in tree construction?
Answer: • Linked List
Question:* Which is an ordered collection of elements in which insertions are restricted to the rear end and deletions are restricted to the front end?
Answer: • Queue
Question:* What is the difference between the stack and queue data structures?
Answer: • Stack is LIFO; Queue is FIFO.
Question:* What is a precondition for a binary search?
Answer: • Sorted Array
Question:* Which is the most suitable data structure for hierarchical data models?
Answer: • Tree
Question:* Which represents data as a chain of nodes and provides dynamic growth of data?
Answer: • Linked List
Question:* What is the process a procedure goes through when one of the steps of the procedure involves invoking the procedure itself?
Answer: • Recursion
Question:* Minimum number of queues needed to implement the priority queue?
Answer: • Two. One queue is used for actual storing of data and another for storing priorities.
Question:* What is the most suitable data structure for a situation where tasks must be scheduled for execution on a computer and the tasks include system tasks?
Answer: • Priority Queue
Question:* The smalled element of an array's index is called its:
Answer: • Lower bound
Question:* Which steps through an array sequentially until a match is found?
Answer: • Sequential Search
Question:* A(n) ______ is the data structure used more than any other data structure.
Answer: • Array
Question:* The most common solution to the Towers of Hanoi involves the use of which datastructure
Answer: • Stack
Question:* Which starts with an empty list and adds elements one-by-one to create a sorted list?
Answer: • Insertion sort
Question:* All binary trees are balanced
Answer: • False
Question:* BFS and DFS are two types of
Answer: • Searching algorithms
Question:* Which is an access mechanism that transforms the search key into a storage address, thereby providing very fast access to stored data?
Answer: • Hashing
Question:* Can a binary tree be implemented using an array?
Answer: • Yes
Question:* What is the running time of finding Nth element in array using quick sort? (For example: Find the 4th smallest element in an unsorted array.)
Answer: • n * log(n)
Question:* A perfect hash function is
Answer: • maps each valid input to a different hash value
Question:* A stack must always be implemented using an array
Answer: • False
Question:* Which of the following is NOT a basic function of a linked list?
Answer: • Deletion of a leaf
Question:* What is the time complexity to compute the average of a N×M matrix?
Answer: • O(N*M)
Question:* What compares adjacent elements and exchanges them to put an array in order?
Answer: • Bubble sort
Question:* What is the data structures used to perform recursion?
Answer: • Stack
Question:* In which of the following areas is data structures NOT applied extensively?
Answer: • Website design
Question:* A balanced binary search tree search average output is
Answer: • O(log n)
Question:* Which of the following problems has the fastest algorithms?
Answer: • Find the maximum value in an array.
Question:* Bubble sort's worst case performance is
Answer: • O(n^2)
Question:* What is the time complexity to insert an item into a B-Tree?
Answer: • O(log N)
Question:* Which data structure provides the fastest lookup time
Answer: • HashMap
Question:* Worst case insert for a dynamic array is
Answer: • O(n)
Question:* A hash table typically has worst case behaviour of
Answer: • O(N)
Question:* What is a disadvantage of a linked list?
Answer: • A linked list will use more storage space than an array to store the same number of elements.
Question:* What is the worst case time complexity to insert a value into a hash table?
Answer: • O(N)
Question:* What is the correct order for a in-order binary tree traversal?
Answer: • Left Child - Parent - Right Child
Question:* Heapsort's worst case performance is
Answer: • O(n * log n)
Question:* What is a partition-exchange sorting algorithm?
Answer: • Quicksort
Question:* Which is a sequence of statements that form a logical argument?
Answer: • Proof
Question:* Merge sorts' worst case performance is
Answer: • O(n log n)
Question:* The postfix form of A*B+C/D is:
Answer: • AB*CD/+
Question:* How is a sequence different from a set?
Answer: • A sequence allows duplicates and is ordered.
Question:* A ________ is a group of elements in a specified order that may contain duplicates.
Answer: • Sequence
Question:* Hashtables are typically used for iterating through values stored in the hashtable
Answer: • False
Question:* What kind of problem does Prim's algorithm solves?
Answer: • Minimum Spanning Tree
Question:* One can convert a binary tree into its mirror image by traversing it in:
Answer: • Postorder
Question:* What is the correct order for a pre-order binary tree traversal?
Answer: • Parent - Left Child - Right Child
Question:* What is the simplest file structure?
Answer: • Sequential
Question:* Quicksort worst case is
Answer: • O(n^2)
Question:* What is the amortized insertion time into a red and black tree?
Answer: • log(N)
Question:* What is the time complexity of a breadth-first-search in an undirected graph G with vertex set V and edge set E? G = (V,E).
Answer: • O(|V| + |E|)
Question:* Selection sort's average case performance is
Answer: • O(n^2)
Question:* Which finds the minimum of the array and exchanges it with the first element of the array?
Answer: • Selection sort
Question:* Which data structure is used in performing non-recursive depth-first search in graphs?
Answer: • Stack
Question:* What is the time complexity to find unique integers in an unsorted indexed array?
Answer: • O(N)
Question:* What is the correct order for a post-order binary tree traversal?
Answer: • Left Child - Right Child - Parent
Question:* A stable sorting algorithm maintains
Answer: • the relative order of records with equal keys
Question:* What is the best-case for comparison based sorting?
Answer: • O(n lg n)
Question:* What is the complexity to radix sort a list of integers in a known range?
Answer: • O(n)
Question:* Which of the following is NOT a metric of algorithm analysis?
Answer: • Coverage
Question:* Which is a way of organizing data that considers not only the items stored, but also their relationship to each other?
Answer: • Data Structure
Question:* A technique for direct search is _______.
Answer: • Hashing
Question:* Can Dijkstra's be used to find the longest-path in a graph?
Answer: • No, they can't
Question:* Which sort will you use if you want to optimize sorting time?
Answer: • Merge sort
Question:* What algorithm uses polynomial time to find the largest common subsequence of two sequences?
Answer: • Dynamic programming with memoization.
Question:* What is the time complexity of the recursive fibonacci sequence without memoization?
Answer: • O(2^n)
Question:* Which of the following is NOT a property of a B-Tree?
Answer: • Data is stored only on the branches.
Question:* What is the worst-case time complexity of finding a maximum cardinality matching in a bipartite graph G = (V,E)?
Answer: • O(|E|*sqrt(|V|))
Question:* The path length from a node to the deepest leaf under it is the _________.
Answer: • Height
Question:* If a node having two children is deleted from a binary tree, it is replaced by its:
Answer: • Inorder successor
Question:* Worst case for a binary search tree is
Answer: • O(n)
Question:* What is the worst-case time complexity of the simple Ford-Fulkerson algorithm for finding the maximum flow in a graph given a source and a sink, and all integer capacities on edges? Assume the graph G = (V,E) has a finite, integer maximum flow value of f.
Answer: • O(|E|f)
Question:* You have a file with 4 billion 32-bit integers. The distribution of the integers is random but uniform. You are supposed to find a number NOT in the file. If you created a bit array and used the index to that array to determine if a number existed in the file approximately how much memory would you need?
Answer: • 512 Megabytes
Question:* A full binary tree with 2n+1 nodes contains:
Answer: • n non-leaf nodes
Question:* BFS Algorithm use which data structure ?
Answer: • Queue
No comments:
Post a Comment