wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Linear Data Structures

Total questions: 21

Worksheet time: 15mins

Name
Class
Date
1.

Array is ___________ data type.

a)

user defined

b)

primary

c)

derived

d)

all of above

2.

A function calls itself is called ___________.

a)

queue

b)

recursion

c)

function

d)

none of above

3.
What does a searching algorithm do?
a)
Search through a set of data
b)
Save a set of data
c)
Help to organise data
4.
Which of these is NOT a Sort algorithm
a)
Binary
b)
Merge
c)
Bubble
d)
Insertion
5.
Which type of sort algorithm is this?
a)
Bubble
b)
Merge
c)
Insertion
6.
Using a binary search why will the number 9 never be found in the following list:
11, 8, 13, 9, 7, 3
a)
It does not work on numbers
b)
It only works on letters
c)
The list is not in order
7.
Which type of sort algorithm is this?
a)
Insertion
b)
Merge
c)
Bubble
8.
Which type of search algorithm is this?
a)
Binary
b)
Linear
9.
Which type of search algorithm is this?
a)
Binary
b)
Linear
10.

Advantages of a linear search algorithm include...

a)

Easy to write

b)

Items don't need to be in order

c)

More efficient than other searches

d)

Doesn't use any variables

11.
A binary search is to be performed on the list:
1  5  10  13  48  68  100  101
How many comparisons would it take to find number 101?
a)
0-1
b)
1-2
c)
3-4
d)
4-5
12.
The following lists represent 3 passes of a sorting algorithm. Which algorithm is being used to sort the list?
 
4    8    6    2    5    7 
4    8    6    2    5    7 
4    6    8    2    5    7
a)
Bubble Sort
b)
Selection Sort
c)
Insertion Sort
13.

A searching technique which works on both sorted and unsorted list

a)

Binary search

b)

Linear Search

c)

both

d)

none

14.

A searching technique which is based on Divide and Conquer approach

a)

Binary search

b)

Linear Search

c)

both

d)

none

15.

A container which can hold a fix number of items and these items should be of the same type. Most of the data structures make use of arrays to implement their algorithms.

a)

Element

b)

Array

c)

Index

16.

•Array length is 15 which means it can store (a)   elements.

17.

Almost all programming languages start arrays at ___

a)

index 0

b)

index 1

c)

index 2

d)

the null character

18.

Which one of the below mentioned is linear data structure −

a)

Stack

b)

Queue

c)

Array

d)

All of the above

19.

In ___________ data structure data items are not in sequence.

a)

non linear

b)

linear

c)

non-homogeneous

d)

all of above

20.

Data Structure is a particular way of storing and organizing data in a computer so that it can be used efficiently.

a)

True

b)

False

21.

A data structure that changes in size as a program needs it by allocating and de-allocating memory is about ...

a)

Static data structures

b)

Dynamic data structues