Sunteți pe pagina 1din 2

BINANGONAN CATHOLIC COLLEGE

Binangonan, Rizal

PRELIMINARY EXAMINATION IN DATA STRUCTURES AND ALGORITHM

I. Simple Recall: Answer the following questions using the pool of words below.

1. Represents the logical relationship that exists between individual elements of


data to carry out certain tasks
2. Used to describe the algorithm, in less formal language than a programming
language
3. The time taken to compile an algorithm.
4. It is the shortest time (or leased space) that the algorithm will use over all
instances of size n for a given problem to produce a desired result
5. It is the longest time that an algorithm will use over all instances of size n for a
given problem to produce a desired result
6. The space in memory used on the run time stack for each function call
7. It is the time to execute the compiled program.
8. similar to a linked list except that the first and last nodes are interconnected
9. The space in memory, which used to hold the variables, data structures, allocated
memory and other data elements.
10. The memory taken by the instructions is not in the control of the programmer as
its totally dependent upon the compiler to assign this memory.
11. Deals with the study of how the data is organized in the memory, how efficiently
the data can be retrieved and manipulated, and the possible ways in which
different data items are logically related.
12. More complicated data structures derived from primary data structures.
13. This can be broadly classified as linear data structures and nonlinear data
structures
14. A linear dynamic data structure that can grow and shrink during its execution
time
15. A data type that is defined entirely by a set of operations
16. Unordered lists which use a ‘hash function’ to insert and search
17. Define the state of the program that the object's method will guarantee to create
for you when it returns
18. A more general branching structure, with less stringent connection conditions
than for a tree
19. The type of ordering is entirely dependent upon the application
20. A branching structure with no loops

Space Complexity Post Conditions Average Case Data Structure Pseudo code

Environment
Compilation time Linked List Data Space Graph
Space
Dynamic data
Tree Data Structure List Run Time
structures
Secondary Data Abstract Data
Circular Link Worst Case Hash Tables
Structures Type
II. Morse Type: From column A, Choose the answer on Column B

1. Add anywhere, remove the highest priority a. Queue


2. Variable-size b. Linked List
3. Add to top and remove from top c. Stack Underflow
4. Fixed-size d. Pop
5. Add to back and remove from front e. Priority Queue
6. adds an item to a stack f. Push
7. When stack is empty g. Array
8. extracts the most recently h. Deque
9. insertion and deletion are done from both the ends. i. Stack
10. end from where the elements are deleted j. Queue
k. List

III. Analogy: identify the Java Program Syntax that was used in the following problem. (2 points)

1. ___________________________
public class Exercise1 {
public static void main(String[] args){

2. ______________ = {
1789, 2035, 1899, 1456, 2013,
1458, 2458, 1254, 1472, 2365,
1456, 2165, 1457, 2456};

3. ______________ = {
"Java",
"Python",
"PHP",
"C#",
"C Programming",
"C++"
};
System.out.println("Original numeric array : "+Arrays.toString(my_array1));
4. _____.______(my_array1);
System.out.println("Sorted numeric array : "+Arrays.toString(my_array1));

System.out.println("Original string array : "+Arrays.toString(my_array2));


5. _____.______(my_array2);
System.out.println("Sorted string array : "+Arrays.toString(my_array2));
}
}

Prepared by:

Raymond A. Ramirez, MIT(Cand)


Instructor

S-ar putea să vă placă și