Data Structures and Algorithms Topic - 1 Flashcards

1
Q
  • is information such as facts and numbers used to
    analyze something or make decisions.
  • is a piece of information, especially facts or
    numbers.
A

Data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
  • is the arrangement of and relations between the parts or elements of something complex.
  • It is constructed or arranged according to a plan; gives a
    pattern or organization.
A

Structure

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

is a specialized format for organizing, processing, retrieving and storing data.

A

Data Structures

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
  • is a set of instructions for solving a problem or accomplishing a task.
  • act as an exact list of instructions that conduct specified actions step by step in either hardware- or software-based routines.
A

Algorithm

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

is a method of organizing data in a virtual system. Think of sequences of numbers, or tables of data: these are both well-defined data structures.

A

Data Structures

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

is a sequence of steps executed by a computer that takes an input and transforms it into a
target output.

A

Algorithm

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

5 Types of Data Structures and Algorithms :

A
  1. Linear Data Structure
  2. Nonlinear Data Structures
  3. Sorting Algorithm
  4. Searching Algorithm
  5. Graph Traversal Algorithm
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

are the simplest, arranging data on a single level.

A

Linear Data Structures

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

Types of Linear Data
Structures :

A
  • Array
  • Linked List
  • Stack
  • Queues
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

They contain multiple levels of data and do not connect elements sequentially.

A

Nonlinear Data Structures

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

Graphs consist of _____ and _____.

A

Nodes and Edges

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

The topmost node is the ____. Connected to the root are zero or more _________.

A

Root & Subtrees

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

are step-by-step procedures
for rearranging data in arrays and lists.

A

Sorting Algorithm

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

3 fundamental algorithms for sorting :

A
  • Insertion Sort
    • For small data sets that are
      almost sorted, insertion sort is
      an efficient way to finish the
      job.
  • Merge Sort
    • is ideal for organizing
      linked lists.
  • Quick Sort
    • Large data sets benefit from
      quick sort. It partitions an
      array in two subarrays based
      on a specified data element,
      called the pivot.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

find and retrieve specific
elements from data structures.

A

Searching Algorithm

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

is a sequential searching
algorithm for sorted and unsorted data structures. It
traverses lists and arrays sequentially, one element at
a time.

A

Linear Search

16
Q

Two key examples of Searching Algorithm :

A
  • Linear Search
  • Binary Search
16
Q
  • is an interval searching algorithm. Interval searches divide elements into multiple intervals and only traverse the expected interval. They are more efficient than sequential searches because they divide
    the search space.
  • is efficient for finding
    elements of a sorted list.
A

Binary Search

17
Q

to search nodes in graphs
and trees.

A

Graph Traversal Algorithm

18
Q

Two algorithms for traversing graphs are :

A

Breadth - First Search
- traverses the shortest
path between two nodes.
Depth - First Search
- searches graphs from top to
bottom.

19
Q

In a tree with two levels of nodes, BFS would search
nodes from left to right in the following order:

A
  1. Tree Root
  2. Nodes to the First Level
  3. Nodes to the Second Level
20
Q

There are three ways to apply DFS:

A
  1. Pre-Order Traversal
    • ( root - leftChild - rightChild )
  2. In-Order Traversal
    • ( root - leftChild – root - rightChild )
  3. Post-Order Traversal
    • ( leftChild - rightChild - root )
21
Q

store similar data elements at contiguous memory
locations, making it easy to process, sort, and search.

A

Array

22
Q

is a series of data elements where each element
points to the next.

A

Linked List

23
Q

is a collection of data elements that follows the
“last-in, first-out” (LIFO) rule.

A

Stack

24
Q

are collections of data elements that follow
the “first-in, first-out” (FIFO) rule.

A

Queues