Week 1 Flashcards

1
Q

is a way of collecting and organizing data in such a way that we can
perform operations on these data in an effective way. It is about rendering
data elements in terms of some relationship, for better organization and storage.

A

Data Structure

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

are structures programmed to store ordered data, so that various operations
can be performed on it easily. It represents the knowledge of data to be organized in
memory.

A

Data Structures

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

Characteristics ofa Data Structure

A
  • Correctness — Data structure implementation should implement its interface correctly.
  • Time Complexity — Running time or the execution time of operations of data structure
    must be as small as possible.
    Space Complexity — Memory usage of a data structure operation should be as little as
    possible.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Data structure implementation should implement its interface correctly.

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

Running time or the execution time of operations of data structure
must be as small as possible.

A
  • Time Complexity —
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Memory usage of a data structure operation should be as little as
possible.

A

Space Complexity —

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

is a step-by-step procedure, which defines a set of instructions to be executed in a
certain order to get the desired output.

A

Algorithm

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

Need for data structure

A

Data Search — Consider an inventory of 1 million (106) items of a store. If the application is to
search an item, it has to search an item in 1 million (106) items every time slowing down the
search. As data grows, search will become slower.
Processor Speed — Processor speed although being very high, falls limited if the data grows to
billion records.
Multiple Requests — as thousands of users can search data simultaneously on a web server, even
the fast server fails while searching the data.

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

Consider an inventory of 1 million (106) items of a store. If the application is to
search an item, it has to search an item in 1 million (106) items every time slowing down the
search. As data grows, search will become slower.

A

Data Search —

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

although being very high, falls limited if the data grows to
billion records.

A

Processor Speed —

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

as thousands of users can search data simultaneously on a web server, even
the fast server fails while searching the data.

A

Multiple Requests —

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

categories of algorithm

A
  • Search — Algorithm to search an item in a data structure.
  • Sort — Algorithm to sort items in a certain order.
  • Insert — Algorithm to insert item in a data structure.
    Update — Algorithm to update an existing item in a data structure.
    Delete — Algorithm to delete an existing item from a data structure.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

algorithm characteristic

A
  • Unambiguous — Algorithm should be clear and unambiguous. Each of its steps (or
    phases), and their inputs/outputs should be clear and must lead to only one meaning.
  • Input — an algorithm should have 0 or more well-defined inputs.
  • Output — an algorithm should have 1 or more well-defined outputs, and should match
    the desired output.
  • Finiteness — Algorithms must terminate after a finite number of steps.
  • Feasibility — should be feasible with the available resources.
  • Independent — an algorithm should have step-by-step directions, which should be
    independent of any programming code.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Basically, data structures are divided into two categories:

A

Linear data structure
Non-linear data structure

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

the elements are arranged in sequence one after the other. Since
elements are arranged order, they are easy to implement.

A

In linear data structures,

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

, elements in memory are arranged in continuous memory. All the elements of an —–
are of the same type. And the type of elements that can be stored in the form of —- is determined
by the programming language.

A

In an array

17
Q

popular linear data structure

A
  1. Array data structure
  2. Stack data structure
  3. Queue Data Structure
  4. Linked List Data Structure
18
Q

elements are stored in the LIFO principle. That is, the last element stored in
a stack will be removed first.
It works just like a pile of plates where the last plate kept on the pile will be removed first.

A
  1. Stack Data Structure
19
Q

works in the FIFO principle where first element stored in the
queue will be removed first.

A
  1. Queue Data Structure
20
Q

data elements are connected through a series of nodes. And each node
contains the data items and address to the next node.

A
  1. Linked List Data Structure
21
Q

Unlike linear data structures, elements are not in any sequence. Instead they
are arranged in a hierarchical manner where one element will be connected to one or more elements.

A

non-linear data structures

22
Q

types of non-linear data structures

A
  1. Graph Data Structure
    In graph data structure, each node is called vertex and each vertex is connected to other
    vertices through edges.
  2. Trees Data Structure
    Like a graph, a tree is also a collection of vertices and edges. However, in tree data
    structure, here can only be one edge between two vertices.
23
Q

each node is called vertex and each vertex is connected to other
vertices through edges.

A
  1. Graph Data Structure
24
Q

Like a graph, it is also a collection of vertices and edges. However, there can only be one edge between two vertices.

A
  1. Trees Data Structure
25
Q

In computer programming terms, an —- is a set of well-defined instructions to solve a
particular problem. It takes a set of input(s) and produces the desired output.

A

algorithm