wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Data Structures FCI

Total questions: 19

Worksheet time: 10mins

Name
Class
Date
1.

What is an Algorithm?

a)

A picture that you use to make a program

b)

A precise set of instructions

c)

Shapes and symbols connected together

d)

Breaking a problem down into smaller tasks

2.

What is the time complexity of this function / algorithm?

a)

Preguntemosle a Oscar

b)

O(n^2)

c)

O(n)

d)

O(1)

e)

O(log(n))

3.

What is the time complexity of this function / algorithm?


a)

O(n)

b)

O(1)

c)

O(nlog(n))

d)

O(n^2)

e)

Preguntemosle a Jhon

4.
Searching for an item in a single dimension array
a)
Linear
b)
Constant
c)
Logarithmic
d)
Polynomial
5.
Pushing an item onto a stack
a)
Linear
b)
Constant
c)
Logarithmic
d)
Polynomial
6.
Basic FOR loop
a)
Linear
b)
Constant
c)
Logarithmic
d)
Polynomial
7.

Difference Between array and calloc()

a)

array: Size is fixed

calloc () : fixed size

b)

array: Size is fixed & static

calloc () : fixed size & dynamic

c)

array: Size is fixed & dynamic

calloc () : fixed size & dynamic

d)

array: Size is fixed & static

calloc () : fixed size can be altered & dynamic

8.

Static vs dynamic memory allocation

a)

compile time,

run time

b)

compile time

c)

run time

d)

None of the above

9.

Which Allocation algorithms are best?

a)

First fit

b)

Worst Fit

c)

Best Fit

10.

Accessing top Element in stack is constant time Operation

a)

TRUE

b)

FALSE

11.

Only top element can be accessed in stack

a)

TRUE

b)

FALSE

12.

Stacks have LIFO ordering

a)

TRUE

b)

FALSE

13.

Nested function calls form a stack

a)

TRUE

b)

FALSE

14.

Which of them is an abstract data structure (ADT)?

a)

A) Stacks

b)

B) Queues

c)

Both A and C

d)

C) Functions

15.

LIFO stands for

a)

Last in First Out

b)

First in Last Out

c)

List of Outputs

d)

None of them

16.

Act of adding values into a stack is called

a)

Popping

b)

Pushing

c)

Polling

d)

None

17.

Which of the following statement(s) about stack data structure is/are NOT correct?

a)

Stack data structure can be implemented using linked list

b)

New node can only be added at the top of the stack

c)

The last node at the bottom of the stack has a NULL link

HIDE ANSWER

d)

Stack is the FIFO data structure

18.

If the elements “A”, “B”, “D” and “C” are placed in a stack and are deleted one at a time, in what order will they be removed?

a)

ABCD

b)

ABDC

c)

CDBA

d)

DCAB

19.

Consider the following operation performed on a stack of size 5.


Push(1);

Pop();

Push(2);

Push(3);

Pop();

Push(4);

Pop();

Pop();

Push(5);


After the completion of all operation, the no of element present on stack are

a)

1

b)

3

c)

2

d)

4