COMPUTER SCIENCE 3100 -- DATA STRUCTURES + ALGORITHMS Study Questions for the First In-Term Exam ====================================================================== Chapter One: Introduction ====================================================================== Define the following: Data Type Data Structure Abstract Data Structure Native Data Type Atomic Data Type Information Hiding ====================================================================== Name some of the advantages of abstract data typing and information hiding. ====================================================================== Chapter Two: Arrays, Records, and Simple Linked Lists ====================================================================== What is it about the usual implementation of arrays that justifies calling arrays "random access" data structures? ====================================================================== What is an array mapping function? What is it used for? Explain its importance to implementing the array as an abstract data structure. ====================================================================== Even though each field of a record can be accessed individually by specifying a field name, the record data type is not usually considered to be a "random access" data structure. Why not? ====================================================================== Certain information, often stored in a small table, is used in connection with implementing RECORD data structures to access the respective FIELDs within the RECORD. What information is this? ====================================================================== Give a definition of the abstract data type "pointer". ====================================================================== What is "dynamic memory allocation"? How does it work? ====================================================================== What is a multi-linked list? Name an application of such a structure. ====================================================================== Chapter Three: Stacks and Queues ====================================================================== Give a definition of a priority queue. ====================================================================== Explain how stacks and queues can be viewed as special cases of a priority queue. ====================================================================== What are the disadvantages to implementing a stack as an array? ====================================================================== What are the disadvantages of the linked implementation of a stack in comparison with the array implementation? ====================================================================== Explain how a double stack is managed. What are the advantages it has over a more conventional array implementation of two stacks? ====================================================================== There are certain problems associated with implementing a FIFO queue as an array. I am talking about problems that do NOT arise in connection with implementing a stack as an array. How are these problems solved by the queue array implementation given in our text? ====================================================================== What are the disadvantages of the array implementation of a priority queue which do NOT arise in connection with the array implementations of stacks and queues in our text? ====================================================================== Our text discusses ways of implementing STACKS, QUEUES, and PRIORITY QUEUES as ARRAYS. What operation(s) of the priority queue described are O(N)? Explain WHY each operation you mention is O(N). ====================================================================== In the discussion of priority queues in our text, it is mentioned that there is an operation on a priority queue containing N elements that can be done in O(log N) time for the array implementation, but takes O(N) time for the linked implementation. What is that operation, and what is the algorithm that makes it so quick in an array? ====================================================================== Explain how a FIFO strategy of disk scheduling can be "unfair to everyone while attempting to be fair to everyone". ====================================================================== Briefly describe the SSTF method of disk scheduling. What are the main advantages and disadvantages of this method. ====================================================================== Explain what the "shortest seek time first" and "sweep, shortest seek time first" methods of disk scheduling are. Be sure to explain how the two methods differ. ====================================================================== Chapter Four: Linear Structures ====================================================================== Stubbs and Webre discuss FIVE operations associated with an ABSTRACT LIST that have DIFFERENT "big O" COMPLEXITY depending on whether the list is implemented as an array or a linked list. Name as many of the five as you can remember, together with their "big O" complexity in each implementation. Clearly label all parts of your answer. (Assume the array and linked list implementations are the ones described in our text. ====================================================================== Derive mathematically the expression for the expected number of probes when doing a successful sequential search in an unordered list of size N. Assume all keys are equally likely. ====================================================================== What is sentinel search? What are its advantages? ====================================================================== What is a chronologically ordered list? ====================================================================== What is a frequency ordered list? ====================================================================== If a frequency ordered list contains 5 elements with frequencies 25, 15, 5, 3, and 2, then what is the expected number of probes when a successful search is done? ====================================================================== What is a self-organizing list? ====================================================================== What is interpolation search? Is interpolation search superior to binary search? In what way? ======================================================================