Lesson 1 Flashcards

1
Q

4 Definitions of Data Structures

A

Data structure is a representation of data and the operations allowed on that data.

A data structure is a way to store and organize data in order to facilitate the access and modifications.

Data Structure are the method of representing of logical relationships between individual data elements related to the solution of a given problem.

a data structure is a way of organizing all data items that considers not only the elements stored but also their relationship to each other.

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

Define Algorithm

A

An ALGORITHM is a step by step procedure to solve a particular function

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

Define Algorithm and Data Structure

A

Therefore, an algorithm is a set of instruction written to carry out certain tasks & the data structure is the way of organizing the data with their logical relationship.

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

Why learn Data structures and algorithms?

A

Data Search
Processor speed
Multiple requests

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

Data Structure graph

A

Data strucutres
├───Non-Primitive
│ ├───Linear
│ │ ├───Dynamic
│ │ │ ├───Linked Lists
│ │ │ ├───Queues
│ │ │ └───Stacks
│ │ └───Static
│ │ └───Arrays
│ └───Non-linear
│ ├───Graphs
│ └───Trees
└───Primitive

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

7 Primitive Data Structures

A

Integer
Character
Boolean
Floating Point
Double Floating Point
Void
Wide Character

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

Linear Data Structures

A

elements arranged in sequential manner

each member element is connected to its previous and next element.

easy to implement as computer memory is also sequential

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

Non-linear Data Structures

A

has no set sequence of connecting all its elements and each element can have multiple paths to connect to other elements

supports multi-level storage and often cannot be traversed in single run.

not easy to implement but are more efficient in utilizing computer memory.

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

DYNAMIC DATA STRUCTURES

A

designed to facilitate change of data structures in the run time and the size can be randomly updated during run time.

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

STATIC DATA STRUCTURE

A

has fixed memory size and Memory size is known before run time.

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

Link list

A

elements are not stored at contiguous location; the elements are linked using pointers.

Each node of a list is made up of two items - the data and a reference to the next node. The last node has a reference to null.

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

Stacks

A

Collection with access only to the last element inserted

Last in first out policy

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

Queues

A

collection with access only to the item that has been present the longest,

implements Last in last out or first in first out policy

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

TREE

A

A tree data structure can be defined recursively as a collection of nodes (starting at a root node), where each node is a data structure consisting of a value, together with a list of references to nodes (the “children”), with the constraints that no reference is duplicated, and none points to the root.

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

GRAPH

A

A graph is a group of vertices and edges where an edge connects a pair of vertices whereas a tree is considered as a minimally connected graph which must be connected and free from loops.

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

Stack functions

A

isFull
isEmpty
push
pop
peek
size

17
Q

Queue Functions

A

isFull
isEmpty
insert
delete
size

18
Q

List Functions

A

size
insert
remove
get
replace