Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

ACTS COMPUTER COLLEGE

P. Guevara Ave., Cor. A. Bonifacio St., Sta. Cruz, Laguna


www.actscc.edu.ph
Department of Computer Studies

PRELIM EXAMINATION
2IT-A-IT201-2CS-A-CS203-Data Structures and Algorithms
1st Semester A.Y. 2020-2021
TOTAL
Name : _____Badinas,Remark Anonuevo____________________________
Date : ________November 3, 2020_________________________ 100
GENERAL INSTRUCTIONS:
1. Read all instructions carefully.
2. Your answers can be typed using word processing application or handwritten.Save your file as
DataStructuresandAlgorithmsPrelimExam_yourfullname.
3. Submit your exam on the Google drive provided to you.
4. One hour and 30 minutes are allocated to complete the exam, including the time spent in downloading of exam and uploading of
your answers.
5. Answer the exam intelligently.

Answer the questions intelligently.


1. Is a dictionary a simple or associative container? Is the ordering a linear ordering or a weak ordering?A dictionary is a
associative container that is a linear ordering for it contains information that is related to other different words and
relations.
2. A spell checker in a program such as a word processor keeps a list of recognized spellings of known words. Is such a
collection kept as a simple or associative container? It is a simple container, It only check the spelling of words that
goes against a list of spelling without any other process or any other relation.
3. A hash table that stores an associative array is sometimes described as a look-up table. For example, in C++, the
statement

Why would the preprocessor need a look-up table to store such definitions?Preprocessor directive re processed after tri-
graphs are processes and comments are removed , and before all other C++ code and It will be preprocessor directives can
be used to improve the readability of code.
4. Is every linear ordering of a finite number of objects a hierarchical ordering? Is every hierarchical ordering a partial
ordering? No, because linear ordering is any relation where any two objects but hierarchical ordering are all relation
may appear very different and all exhibit the same properties, partial orderings has multiple starting points and one
class may have multiple prerequisites.
5. Describe the difference between an explicitly defined and an implicitly defined relation. Implicitly defined relation are
done by other codes running behind the scene while explicitly defined relations are manual approach to change what
you want by writing out the code yourself.
Prepared by: Reviewed/Approved by: Noted by:

DR. ADOREE A. RAMOS DR. ADOREE A. RAMOS PROF. RUBEN F. MACALINAO, MBA, MM
Faculty Head, Department of Business Management President/Director
6. Discuss the three classifications of memory allocation.
.Contiguous touching in actual contact next space, meeting at a common boundary or bordering adjoining or
connected throughout in an unbroken sequence. Linked is storage such as linked list associates two pieces of data with
each item being stored.Indexed is array of pointers link to a sequence of allocated memory location.

7. Distinguish some variations of memory allocations such as Trees, Graphs,, Deques (linked arrays) and inodes

Dynamic memory are block of


memory used while running a
programs

Variable or instances of
structure of class

Static memory used to by


operating system

8. Which of the following are equal?

9.

i. 5^3 = 125 3^5 = 243 There are not Equal


ii. 8^2 = 64 4^3 = 64 There are not Equal
iii. 16^lg(4) = 5.30826 4^lg(16) = 5.30826 There are Equal

Prepared by: Reviewed/Approved by: Noted by:

DR. ADOREE A. RAMOS DR. ADOREE A. RAMOS PROF. RUBEN F. MACALINAO, MBA, MM
Faculty Head, Department of Business Management President/Director

You might also like