wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

DS Quiz 1

Total questions: 31

Worksheet time: 16mins

Name
Class
Date
1.

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

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)

Preguntemos al Ruso

b)

O(1)

c)

O(n^2)

d)

O(nlog(n))

e)

O(n)

4.

What is the time complexity of this function / algorithm?

a)

O(n)

b)

O(log(n))

c)

O(1)

d)

O(n^2)

e)

Preguntale al frances

5.

What is the time complexity of this function / algorithm?

a)

O(n)

b)

Colinas debe saber !

c)

O(n^2)

d)

O(1)

e)

O(nlog(n))

6.

What is the time complexity of accessing the nth element on an unsorted array?

a)

O(n)

b)

O(1)

c)

O(log(n))

d)

O(n^2)

7.

What is the time complexity of this function / algorithm?

a)

O(n)

b)

Colinas debe saber !

c)

O(n^2)

d)

O(1)

e)

O(nlog(n))

8.

What is the time complexity of this function / algorithm?

a)

No se ve

b)

O(nlog(n))

c)

O(1)

d)

O(n^2)

e)

O(n)

9.

What is the time complexity of accessing the nth element on an unsorted array?

a)

O(n)

b)

O(1)

c)

O(log(n))

d)

O(n^2)

10.

Indicate constant time complexity in terms of Big-O notation

a)

O(n)

b)

O(1)

c)

O(log n)

d)

O (n^2)

11.

Indicate exponential time complexity in terms of big-O notation

a)

O (n)

b)

O (n^2)

c)

O (2^n)

d)

O (log n)

12.

Which notation is consistent for every execution?

a)

O (n)

b)

O (n^2)

c)

O (1)

d)

O (2^n)

13.

Indicate polynomial time complexity in terms of big-O notation

a)

O (n!)

b)

O (1)

c)

O (n^2)

d)

O (log n)

14.

What advantage does a linked list have over an array?

a)

Size of the list doesn't need to be mentioned at the beginning of the program

b)

You can add or remove elements from the middle of the list.

c)

The linked list doesn't have a size limit

d)

All of these are true.

15.

Nodes in a linked list contain two things

a)

Direction and a pointer

b)

Data and a pointer

c)

A Pointer and a reference

d)

A pointer and a node

16.

The situation when in a linked list Head==NULL

is

a)

Full

b)

Empty

c)

Half full

d)

saturated

17.

In the above image what will be printed when Head->next->data?

a)

83

b)

9

c)

27

d)

Error

18.

Which of the following statement is not correct?

a)

List is a linear structure

b)

There are 2 example of list, Array List & Linked List.

c)

Array List is not an example of List

d)

List contains a sequence of elements

19.

Which the following circular linked list

a)
b)
c)
20.

The doubly linked list would have how many fields in a node?

a)

1

b)

2

c)

3

d)

4

21.

How many null pointers exists in a circular linked list?

a)

0

b)

1

c)

2

d)

3

22.

Which of the following is a linear data structure?

a)

Graph

b)

Binary Tree

c)

Linked list

d)

AVL Tree

23.

What is the disadvantage of array data structure?

a)

Elements of an array can be accessed in constant time

b)

Elements are stored in contiguous memory location

c)

The amount of memory to be allocated should be known beforehand

d)

Multiple other data structures can be implemented using Array

24.

A queue follows _________

a)

LIFO

b)

FIFO

c)

Linear Tree

d)

Ordered Aray

25.

How can we describe an array in the best possible way?

a)

The Array shows a hierarchical structure.

b)

Arrays are immutable (Not Modifiable)

c)

Container that stores the elements of similar types

d)

The Array is not a data structure

26.

_is a way to classify various types of data such as integer, string, etc.

a)

Dynamic programming

b)

Data Type

c)

Data object

d)

Basic Operations

27.

which one is the example of built in data type

a)

Deletion

b)

List

c)

Stack

d)

Integers

28.

Data types which are implementation independent as they can be implemented in one or the other way are known as_

a)

Data Type

b)

Data Definition

c)

Derived Data Type

d)

Built-in Data Type

29.

a linear data structure, in which the elements are not stored at contiguous memory locations.

a)

arrays

b)

stack

c)

Queue

d)

Linked list

30.

a collection of items stored at contiguous memory locations.

a)

index

b)

Array

c)

stack

d)

queue

31.

 Fibonacci sequence looks like

a)

0,0,1,2,3,5,8,

b)

0,0,1,2,3,5,8,13

c)

0,1,1,1,2,3,5,8,

d)

0,1,1,2,3,5,8,13