Data Flashcards

1
Q

is a very simple search algorithm. In this type of search, a sequential search is made over all items one by one. Every item is checked and if a match is found then that particular item is returned, otherwise the search continues till the end of the data collection.

A

Linear search

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

is an improved variant of binary search. This search algorithm works on the probing position of the required value.

A

Interpolation search

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

is a fast search algorithm with run-time complexity of Ο (log n). This search algorithm works on the principle of divide and conquer.

A

Binary search

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

refers to arranging data in a particular format. Sorting algorithm specifies the way to arrange data in a particular order. Most common orders are in numerical or lexicographical order.

A

Sorting

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

directory stores the telephone numbers of people sorted by their names, so that the names can be searched easily.

A

Telephone Directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

tores words in an alphabetical order so that searching of any word becomes easy.

A

Dictionary

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

these algorithms do not require any extra space and sorting is said to happen in-place, or for example, within the array itself

A

In-Place Sorting

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

the program requires space which is more than or equal to the elements being sorted. Sorting which uses equal or more space

A

Not In-Place Sorting

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

does not change the sequence of similar
content in which they appear

A

Stable Sorting

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

changes the sequence of similar content
in which they appear

A

Unstable Sorting

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

is a simple sorting algorithm. This sorting algorithm is comparison-based algorithm in which each pair of adjacent elements is compared and the elements are swapped if they are not in order. This algorithm is not suitable for large data sets as its average and worst case complexity are of O(n2) where n is the number of items.

A

Bubble sort

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

An element which is to be ‘inserted’ in this sorted sub-list, has to find its appropriate place and then it has to be inserted there.
The array is searched sequentially and unsorted items are moved and inserted into the sorted sub-list (in the same array). This algorithm is not suitable for large data sets as its average and worst case complexity are of Ο(n2), where n is the number of items.

A

Insertion Sort

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

is a pictorial representation of a set of objects where some pairs of objects are connected by links.

A

graph

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

the interconnected objects are represented by points termed. Each node of the graph is represented as a vertex.

A

Vertices

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

the links that connect the vertices. Edge represents a path between two vertices or a line between two vertices.

A

Edges

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Two node or vertices are adjacent if they are connected to each other through an edge.

A

Adjacency

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

represents a sequence of edges between the two vertices.

A

Path

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What are the 3 basic operations

A

Add vertex
Add edges
Display Vertix

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Adds a vertex to the graph.

A

Add Vertex

20
Q

Adds an edge between the two vertices of the graph.

A

Add Edge .

21
Q

Displays a vertex of the graph.

A

Display Vertex

22
Q

algorithm traverses a graph in a depthward motion and uses a stack to remember to get the next vertex to start a search, when a dead end occurs in any iteration.

A

Depth First Search (DFS)

23
Q

algorithm traverses a graph in a breadthward motion and uses a queue to remember to get the next vertex to start a search, when a dead end occurs in any iteration.

A

Breadth First Search (BFS)

24
Q

represents the nodes connected by edges. We will discuss binary tree or binary search tree specifically.

A

Tree

25
Q

s a special data structure used for data storage purposes. A binary tree has a special condition that each node can have a maximum of two children. A binary tree has the benefits of both an ordered array and a linked list as search is as quick as in a sorted array and insertion or deletion operation are as fast as in linked list.

A

Binary Tree

26
Q

refers to the sequence of nodes along the edges of a tree

A

Path

27
Q

The node at the top of the tree is called root. There is only one root per tree and one path from the root node to any node.

A

Root

28
Q

Any node except the root node has one edge upward to a node called parent.

A

Parent

29
Q

The node below a given node connected by its edge downward is called its child node.

A

Child

30
Q

The node which does not have any child node is called the leaf node.

A

Leaf

31
Q

represents the descendants of a node.

A

Subtree

32
Q

refers to checking the value of a node when control is on the node.

A

Visiting

33
Q

means passing through nodes in a specific order.

A

Traversing

34
Q

a node represents the generation of a node. If the root node is at level 0, then its next child node is at level 1, its grandchild is at level 2, and so on.

A

Levels

35
Q

represents a value of a node based on which a search operation is to be carried out for a node.

A

Keys

36
Q

is a collection of nodes arranged in a way where they maintain BST properties. BST divides all its sub-trees into two segments; the left sub-tree and the right sub-tree.

A

BST

37
Q

BST Basic Operations

A

Insert
Search
Pre-order Traversal
In-order Traversal
Post-order Traversal

38
Q

an element in a tree/create a tree.

A

Insert

39
Q

an element in a tree.
.

A

Search

40
Q

Traverses a tree in a pre-order manner.

A

Pre-order Traversal

41
Q

Traverses a tree in an in-order manner.

A

.In-order Traversal

42
Q

Traverses a tree in a post-order manner.

A

Post-order Traversal

43
Q

is a process to visit all the nodes of a tree and may print their values too. Because, all nodes are connected via edges (links) we always start from the root (head) node. There are three ways which we use to traverse a tree:

A

Traversal

44
Q

In this traversal method, the left subtree is visited first, then the root and later the right sub-tree.

A

In-order Traversal

45
Q

In this traversal method, the root node is visited first, then the left subtree and finally the right subtree.

A

Pre-order Traversal

46
Q

In this traversal method, the root node is visited last, hence the name. First we traverse the left subtree, then the right subtree and finally the root node.

A

Post-order Traversal