Lesson 1: Introduction to Data Structure

5.0(1)
studied byStudied by 14 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/22

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

23 Terms

1
New cards

Why Data Structure Matters

  • serves as an architectural blueprint

  • dictates how data is organized and accessed by the elegance of the software system

2
New cards

Data Structure

A systematic way of organizing and storing data in a computer so it can be efficiently accessed and modified

  • arranging data in a computer

  • like a container or a format that enables us to work with data effectively

  • fundamental building blocks

3
New cards

Classifications of Data Structure

  1. Primitive and Non-primitive Data

  2. Linear and Non-linear Data

4
New cards

Primitive Data Structure

  • fundamental type of data structure

  • store one data or single type of data

  • EXAMPLES: integer, float, character, and pointer

5
New cards

Non-primitive Data Structure

  • type of data structure that the user can define that store on a different type in a single entity

  • EXAMPLE: arrays, lists, and files

6
New cards

Linear Data Structure

  • static and dynamic

  • a type of data structure that is sequential

  • all data or element are stored in a sequential manner

  • EXAMPLES: array, list, stack, and queue

7
New cards

Non-linear Data Structure

  • form of data structure that doesn’t stay arranged sequentially

  • doesn’t involve a single level

  • not easy to implement

  • utilization of computer memory is efficient

  • EXAMPLES: graph and tree

8
New cards

Basic Data Type (or Primitive Data Structures)

  • represents a set of individual data and is frequently used to create a program

  • also called atomic data structure because it represent a data where it can no longer be divided

  • can store a single value in a variable

  • divided into two: Simple Type and Pointer Type

9
New cards

Simple Type

  • declared according to syntax rule of programming language

  • stores value that the users input

Example declaration:

DataType VariableName = value;

10
New cards

Pointer Type

  • can hold or store memory address of another variable

  • when declaring, it has to specify the data type it points to

11
New cards

Structure Type (or Simple Data Structure)

  • a data structure that contains a basic data type or any of the defined data types as its elements

  • useful if we want to organize a collection of data but does not want to manage the data separately

  • EXAMPLES: arrays, strings, and records

12
New cards

Trees (Non-primitive - Non-linear)

  • hierarchical data structure with root nodes and branches leading to various child nodes

  • used for task-like organizing data

13
New cards

Graphs (Non-primitive - Non-linear)

  • used to represent connection between objects

  • consist of edge and vertices

  • crucial for modelling complex relationships

14
New cards

Hash Table (Non-primitive - Non-linear)

  • uses hash function to map keys allowing for the rapid data retrieval

  • often used in databases and implementing data dictionary

15
New cards

Benefits of Data Structures

  • efficiency of the program

  • exhibits time complexity

  • reusable

  • data storage

  • access the data anytime

16
New cards

Disadvantages of Data Structure

  • complex

  • time

  • cumbersome (complex)

17
New cards

Traversing (Data Structure Operations)

accessing or visiting each storage location where the data is stored

18
New cards

Searching (Data Structure Operations)

finding the location/s of data that satisfies one or more conditions

19
New cards

Inserting (Data Structure Operations)

adding new data into the data structure

20
New cards

Deleting (Data Structure Operations)

removing existing data from the data structure

21
New cards

Sorting (Data Structure Operations)

arranging the data in a specified order, either ascending or descending

22
New cards

Merging (Data Structure Operations)

combining the data from two data structures

23
New cards

Searching for Min/Max

  • finding the minimum or maximum element in the data structure

  • often used in priority queues or finding extreme values in datasets