Chapter 1: Introduction to Data Structures and Algorihtm

0.0(0)
studied byStudied by 0 people
0.0(0)
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/87

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 12:12 AM on 1/21/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

88 Terms

1
New cards

Data

It is the information processed by computers.

2
New cards

Structure, Unstructured

It is the two types of data.

3
New cards

Structured Data

It follows a fixed and organized format.

4
New cards

Unstructured Data

It follows an unfixed, scattered format.

5
New cards

Data Structure and Algorithm

Provide a set of techniques to the programmer for handling the data efficiently.

6
New cards

Data Structure and Algorithm

Allow programmers to write code in any programming language with minimal effort.

7
New cards

Pre-defined Algorithmic Techniques

If a programmer does not know these techniques, it may take a longer time to resolve the problem.

8
New cards

Data Structure

Study of various ways of organizing data in a computer.

9
New cards

Data Structure

Programmatic way of storing data so that data can be used efficiently.

10
New cards

Data Structure

A systematic way to organize data in order to use it efficiently.

11
New cards

Data Structure

Method of storing data to be used efficiently.

12
New cards

Structure, Algorithms

Adding _______ to data can make ________ much simple, easier to maintain, and often makes algorithm faster.

13
New cards

Program

are comprised of two things: data and algorithms.

14
New cards

Data

information processed or stored by a computer.

15
New cards

Algorithm

Describes the way the data is to be transformed.

16
New cards

Interface

Represents the set of operations that a data structure supports.

17
New cards

Interface

Provides the list of supported operations.

18
New cards

Interface

Specifies the type of parameters operations can accept.

19
New cards

Interface

Specifies the return type of operations.

20
New cards

Interface

It is considered the front-end section of a data structure.

21
New cards

Implementation

Provides the internal representation of a data structure.

22
New cards

Implementation

Provides the definition of the algorithms used in the operations of the data structure.

23
New cards

Implementation

It pertains to the underlying process that makes the interface work.

24
New cards

Characteristics of a Data Structure

These are the traits needed in order to cater to the demands expected from a data structure. In short, these traits are what makes up a GOOD data structure.

25
New cards

Characteristics of a Data Structure

  • Correctness

  • Time Complexity

  • Space Complexity

26
New cards

Correctness

Data structure implementation should implement its interface correctly.

27
New cards

Time Complexity Efficient

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

28
New cards

Space Complexity Efficient

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

29
New cards

Needs of a Data Structure

These are the reasons why data structured is needed.

30
New cards

Needs of a Data structure

  • Data Search

  • Processor Speed

  • Multiple Requests

31
New cards

Data Search

Searching 1 million items every time slows down the search process. As data grows, search will become slower. A good data structure will be able to help efficiently search for the needed data.

32
New cards

Processor Speed

_______________ although being very high, falls limited if the data grows to billion records. A good data structure will help maintain the processor speed at stable.

33
New cards

Multiple Requests

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

34
New cards

Execution Time Cases

These pertains to the case scenarios that give the measurement of resources: time and space used.

35
New cards

Worse, Average, Best

This is the types of Execution Time Cases.

36
New cards

Worst Case

Scenario where a data structure operation takes maximum time.

37
New cards

Average Case

Scenario depicting the average execution time of a data structure operation.

38
New cards

Best Case

Scenario depicting the least possible execution time of a data structure operation.

39
New cards

Algorithm

A step-by-step procedure defining a set of instructions to be executed in a certain order to get the desired output.

40
New cards

Algorithm

Created independent of underlying programming languages.

41
New cards

Algorithm

Can be implemented in more than one programming language.

42
New cards

Algorithm

It performs the “implementation” part or what these data is supposed to do.

43
New cards

Categories of Algorithm

  • Search

  • Sort

  • Insert

  • Update

  • Delete

44
New cards

Search, Sort, Insert, Update, Delete

These are the categories of algorithms.

45
New cards

Search Algorithm

Algorithm to search an item in a data structure.

46
New cards

Sort Algorithm

Algorithm to sort items in a certain order.

47
New cards

Insert Algorithm

Algorithm to insert an item in a data structure.

48
New cards

Update Algorithm

Algorithm to update an existing item in a data structure.

49
New cards

Delete Algorithm

Algorithm to delete an existing item from a data structure.

50
New cards

Characteristics of an Algorithm

  • Unambiguous

  • Input

  • Output

  • Finiteness/Feasibility

  • Independent

51
New cards

Unambiguous, Input, Output, Finiteness/Feasibility, Independent

These are the characteristics of an algorithm. UIOFFI

52
New cards

Unambiguous

Algorithm steps and inputs/outputs must be clear and lead to only one meaning.

53
New cards

Input

Algorithm should have zero or more well-defined inputs.

54
New cards

Output

Algorithm should have one or more well-defined outputs matching the desired output.

55
New cards

Finiteness

Algorithm must terminate after a finite number of steps.

56
New cards

Feasibility

Algorithm should be feasible with available resources.

57
New cards

Independent

Algorithm steps should be independent of any programming code.

58
New cards

Algorithm Writing Standard

There are no well-defined standards for writing algorithms.

59
New cards

Algorithm Writing

Problem and resource dependent.

60
New cards

Algorithm

They are never written to support a particular programming code.

61
New cards

Algorithm Writing

It is a process executed after the problem domain is well-defined.

62
New cards

Problem Domain

Must be known before designing a solution or writing an algorithm.

63
New cards

Algorithm Examples

  • Taxi Algorithm

  • Call Me Algorithm

  • Rent A Car Algorithm

  • Bus Algorithm

64
New cards

Taxi Algorithm

Go to taxi stand, get in a taxi, give the driver my address.

65
New cards

Call-Me Algorithm

Call when plane arrives and meet outside baggage claim.

66
New cards

Rent-a-Car Algorithm

Take shuttle, rent a car, follow directions home.

67
New cards

Bus Algorithm

Catch bus 70, transfer to bus 14, get off on Elmo Street, walk to house.

68
New cards

Algorithm Analysis

It pertains to the method used to analyze the efficient of an algorithm: before and after implementation.

69
New cards
  • A Priori Analysis

  • A Posterior Analysis

Two Types of Algorithm Analysis.

70
New cards

A Priori Analysis

It is a theoretical analysis of an algorithm.

71
New cards

A Priori Analysis

The efficiency of an algorithm is measured by assuming that all other factors, for example, processor speed, are constant and have no effect on the implementation.

72
New cards

A Posterior Analysis

Empirical analysis using actual implementation and execution.

73
New cards

A Posterior Analysis

Collects actual running time and space statistics. This is then executed on target computer machine.

74
New cards

A Posterior Analysis

The selected algorithm is implemented using programming language.

75
New cards

Algorithm Complexity

Determined by time and space used by algorithm X.

76
New cards

algorithm, input data

Suppose X is an _______ and n is the size of ________, the time and space used by the algorithm X are the two main factors, which decide the efficiency of X.

77
New cards

Efficiency

The time and space used by the algorithm X are the two main factors, which decide the ________ of X.

78
New cards

Time Factor

It is measured by counting key operations such as comparisons in the sorting algorithm.

79
New cards

Space Factor

Measured by counting maximum memory space required by the algorithm.

80
New cards

Complexity of an Algorithms

Gives running time and/or storage space required by the algorithm in terms of input size n.

81
New cards

Space Complexity

Amount of memory space required by an algorithm during its life cycle.

82
New cards

Space

The _____ required by an algorithm is equal to the sum of the following two components: fixed and variable part.

83
New cards

Fixed Part

It is a space required to store certain data and variables, that are independent of the size of the problem.

84
New cards

Fixed Part

For example, simple variables and constants used, program size, etc.

85
New cards

Variable Part

It is a space required by variables, whose size depends on the size of the problem.

86
New cards

Variable Part

Example of this are Dynamic memory allocation and recursion stack space.

87
New cards

Time Complexity

Amount of time required by an algorithm to run to completion.

88
New cards

Time Complexity

Its requirements can be defined as a numerical function T(n), where T(n) can be measured as the number of steps, provided each step consumes constant time.

Explore top flashcards