Definitions Flashcards

1
Q

Define Data

A

It represents a value or a set of values that does not carry any meaning.

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

What is information?

A

The processed data that carry information is called as information.

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

Define: Data Structures

A

It is a way of organizing data, such that accessing of data becomes easier. It also plays a vital role in creating efficient programs.

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

What are the applications of Data Structures?

A
  • Compiler design
  • Operating System
  • Statistical Analysis package
  • DBMS
  • Numerical analysis
  • Simulation
  • Artificial Intelligence
  • Graphics
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is an efficient program? And when is the program considered as a good program?

A

A program is said to be efficient when it executes in minimum time and with minimum memory space. A good program is defined to be a program that runs correctly, is easy to read and understand, is easy to debug and is easy to modify.

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

What are some examples of Data Structures?

A

Stacks, Queue, Array, Linked list, Binary trees and Hash tables.

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

Define ADT

A

ADT or Abstract Data Type is a set of operations that tells us what to do rather than how to do. Hence, it is easy to maintain, extend and update at later years.

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

What are the operations of DS?

A

Inserting, Deleting, Searching, Traversing and Merging.

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

What are the two classifications of DS?

A

Primitive (int, char, float, double, etc.,) and Non-Primitive (Linear: Array, linked list, stack, queue| Non-Linear: Trees, Graphs and Tables)

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

What is an array?

A

An array is a collection of data items of similar data type.

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

What is a Linked List?

A

It is a linear data structure that consists of several nodes, each with two parts. First part is the data field and the next part is the address of the next node.

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

What is a circularly linked list?

A

It is a collection of nodes, each having two fields. The data field and the address field. In a circularly linked list, the address field of the last node points to the address of the first node.

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

What is a stack?

A

A stack is a linear data structure in which elements are inserted and deleted at only one end called top of the stack. Elements are inserted and deleted or removed by the LIFO principle (Last In, First Out).

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

What are the two fundamental operations of a stack?

A

Push: Add elements to the stack and Pop: Remove elements from the stack. Some additional operations are Peek (Top): Retrieve the top element without removing it, isEmpty(): Checks whether the stack is empty and isFull(): Checks whether the stack is full.

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

Define underflow.

A

The underflow condition in a stack occurs when a pop or peek operation is attempted on an empty stack.

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

Define overflow.

A

The overflow condition in a stack occurs when a push operation is attempted on a full stack, that is, a stack that has reached it’s maximum capacity.

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

Define Queue.

A

Queue is a linear data structure in which elements are inserted in one end called ‘rear’ and deleted in the other end called ‘front’. Other name is FIFO (First In, First Out)

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

What are the two operations in Queue?

A

Enqueue: process of inserting an element into the queue and Dequeue: process of deleting an element from the queue.

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

Define trees.

A

It is a non-linear data structure which is a collection of nodes with one distinct node called root node, while the remaining nodes are partitioned as t1, t2,…, tk where k>=0 each of which are sub trees and the edges of t2 to tk are connected to the root.

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

What is a binary tree?

A

In a binary tree, each node can have at most two children. A binary tree is either empty or consists of a root node with a left and right subtree.

21
Q

Define full binary tree.

A

A binary tree in which it has two children or no child.

22
Q

Define complete binary tree.

A

It is a binary tree with every level except possibly the last is completely filled and all nodes in the last level are as far left as possible.

23
Q

What is called as a perfect binary tree?

A

It is a binary tree where all the leaf nodes are at the same level.

24
Q

What is an expression tree?

A

It is a binary tree used to represent algebraic and Boolean expression. It is a tree with leaves as operands and nodes as operators.

25
Q

Define Binary Search Tree or BST.

A

BST is a binary tree in which every parent node key value is greater than it’s left subtree and lesser than the right subtree.

26
Q

What are the operations that can be performed in a BST?

A

Insertion, deletion and Searching.

27
Q

Define Heap tree.

A

It is a binary tree that satisfies the following two properties:
- Structure property: It is a complete binary tree, that is, all the nodes are filled with children, except the bottom level, where it is filled from left to right.
- Heap order property: For any node, it’s parent node key value is smaller, except the root node which does not have a parent.

28
Q

How does the Heap Order property change when it comes to Max Heap?

A

In max heap, the heap order property is that, for any node, it’s parent node value is greater.

29
Q

What is an AVL tree?

A

AVL tree or Adelson-Velsky Landis tree is a binary search tree with a balancing factor -1, 0 and 1.

30
Q

What is the formula for balancing factor?

A

Balancing factor = height of left subtree - height of right subtree.

31
Q

When the balancing factor is greater than two, what is done?

A

If the balancing factor becomes greater than two, then the following four rotations are done.
> Left-Left
> Left-Right
> Right-Right
> Right-Left

32
Q

What is a B-tree?

A

B-tree is a self-balancing tree data structure that keeps data sorted and allow searches, sequential access, insertion and deletion.

33
Q

What is a B+ tree?

A

A B+ tree is a balanced tree in which every path from the root of the tree to a leaf is of the same length and each non-leaf node has between n/2 and n children, where n is fixed for a particular time.

34
Q

Define graph.

A

It is a non-linear data structure with a set of vertices and edges connecting the vertices.

35
Q

What are the types of graphs?

A
  • Directed graph/ Digraph
  • Undirected graph
    -Weighted graph
  • Unweighted graph
  • Connected graph
  • Cyclic graph
  • DAG or Directed Acyclic Graph
36
Q

How do you represent graphs?

A

There are two types: Adjacency matrix and Adjacency list.

37
Q

What is an Adjacency Matrix?

A

The graph is represented using rows and columns. Each cell is marked with one if edge exist and zero if there is no edge.

38
Q

What is an Adjacency List?

A

Graph is represented in a linked list form. Every nodes adjacent nodes are linked with each other.

39
Q

Define Topological Sorting.

A

Topological sorting is the ordering of vertices in a directed graph with a property that if there is a path from vi to vj then vi must come before vj in the ordering.

40
Q

In which case is topological sorting impossible?

A

Topological sort is impossible in cyclic graphs, but possible for DAG.

41
Q

What is graph traversal?

A

The process of visiting each and every vertex at least once is called as graph traversal.

42
Q

Define Breadth First Search or BFS.

A

BFS produces a spanning tree as the result. Queue data structure is used to implement BFS.Def

43
Q

Define Depth First Search or DFS.

A

It produces spanning tree as the result. It uses stack with maximum size as the total number of vertices in the graph.

44
Q

Define searching.

A

Searching is the process done to find whether a particular value is present in an array or not. If the value is present in the array, then searching is said to be successful and gives the location of that value in the array.

45
Q

What is Linear Search?

A

Linear Search, also called as Sequential search, is a simple method used for searching an array for a particular value. It works by comparing the search element with every element in the array, one by one until a match is found. It works on unordered list.

46
Q

What is Binary search?

A

Binary search is a searching algorithm that works efficiently on a sorted list. It compares the target with the middle element of the array. If they are not equal, then the half in which the search element cannot lie is eliminated and the search continues in the other half.

47
Q

Define sorting.

A

Sorting means arranging the elements of an array so that they are placed in some relevant order which maybe ascending or descending.

48
Q

Explain Internal Sorting.

A

It deals with sorting the data stored in the computer’s memory. It is applicable when the number of elements in the list is small. Example: Bubble sort, Insertion sort, Shell sort, Quick sort, Selection sort, Radix sort.

49
Q

What is External sorting?

A

External sorting deals with sorting data stored in files. It is applied when there is voluminous data that cannot be stored in the memory. Eg: Merge sort