COMSCI 1201 LEC (Data Structures & Algorithms)

studied byStudied by 50 people
5.0(4)
Get a hint
Hint

refers to a collection of individual values that can take many forms, such as text, images, audio, or video, usually represented with the help of characters such as alphabets, digits, or special characters.

1 / 51

flashcard set

Earn XP

Description and Tags

52 Terms

1

refers to a collection of individual values that can take many forms, such as text, images, audio, or video, usually represented with the help of characters such as alphabets, digits, or special characters.

Data

New cards
2

examples of data are:

names, ages, prices, costs, numbers of items sold, employee names, etc.

New cards
3

Data themselves are fairly useless, but when these data are processed or organized, they become useful and is now called__

information.

New cards
4

data needs to be __ to provide information.

organized

New cards
5

__ is a storage that is used to store and organize data. It is a way of arranging data on a computer so that it can be accessed and updated efficiently.

data structure

New cards
6

it easy for users to access and work with the data they need in appropriate ways.

data structure

New cards
7

Data Structure It is not only used for organizing the data but also for ___using various algorithms.

processing, retrieving, and storing data

New cards
8

Data structure is classified into two types

primitive and non-primitive.

New cards
9

Also known as basic data structure, it contains fundamental data types that can only hold single data type values.

Primitive data structure

New cards
10

Examples of primitive data

integer, character, boolean, float, double, long, etc.

New cards
11

a data structure that focuses on forming a set or collection of data elements that is either homogeneous or heterogeneous

Non-primitive data structure

New cards
12

What is Homogenous and its example?

(same data type. ex. integer array num)

New cards
13

What is Heterogeneous

and its example?

(different data types. ex. structure Student that contains char array name, integer age, etc.)

New cards
14

Non-primitive data structure also known as ___, as they are derived on primitive ones.

derived data structure

New cards
15

A ___ can be stored using the non- primitive data structures.

large number of values

New cards
16

The data stored can also be manipulated using various operations like

  • insertion,

  • deletion,

  • searching,

  • sorting,

New cards
17

Non-primitive data structures are divided into two categories:

linear and non-linear data structures

New cards
18

a type of data structure in which data elements are arranged sequentially or linearly.

Linear data structure

New cards
19

Since elements are arranged in a sequential or particular order, linear data structure is __

easier to access.

New cards
20

Examples of linear data structures are__

array, stack, queue, and linked list.

New cards
21

When the elements of a data structure doesn't stay sequentially or linearly, the data structure is called to be __

Non-linear data structure

New cards
22

Since the data structure is non-linear, it does not involve a__. Therefore, they can’t_ all of its elements in a single run.

  • single level

  • traverse

New cards
23

examples of non-linear data structures.

Trees and graphs

New cards
24

What are the Data Structure Operations ( enumerate)

  • Navigating

  • Searching

  • Insertion

  • Deletion

  • Sorting

  • Merging

New cards
25

Accessing each data element exactly once so that certain items in the data may be processed

Navigating

New cards
26

Finding the location of the data element or key in the structure.

Searching

New cards
27

Adding a new data element to the structure

Insertion

New cards
28

Removing a data element from the structure

Deletion

New cards
29

Arrange the data elements in a logical order (ascending/descending)

Sorting

New cards
30

Combining data elements from two or more data structures into one

Merging

New cards
31

defined as a step-by-step procedure or method with a finite set of instructions to accomplish a particular task.

algorithm

New cards
32

Basically, it is not the complete code, rather it is the__ that can be implemented to solve a particular problem.

logic

New cards
33

While defining an algorithm, steps are written in human understandable language and independent of any programming language, which are usually represented by using___

flowcharts or pseudocode.

New cards
34

Algorithm =

Algorithm = Input + Process + Output

New cards
35

What are the Characteristics of an Algorithm ( enumerate)

  • Unambiguous

  • Inputs

  • Outputs

  • Correctness

  • Finiteness

  • Effectiveness

  • Language Independent

New cards
36

Instructions in an algorithm should be clear, simple, and straightforward.

Unambiguous

New cards
37

An algorithm should have some input values.

Inputs

New cards
38

At the end of an algorithm, you must have one or more outcomes.

Outputs

New cards
39

An algorithm is designed correctly if it receives valid input, terminates, and always returns the correct output.

Correctness

New cards
40

The algorithm should contain a limited and countable number of instructions and should terminate after a finite time.

Finiteness

New cards
41

Each step of the algorithm should be effective and efficient enough to produce results.

Effectiveness

New cards
42

The effectiveness of an algorithm can be evaluated with the help of two important parameters:

  1. Time Complexity

  2. Space Complexity

New cards
43

This refers to the amount of time taken by the computer to run the algorithm.

Time Complexity

New cards
44

the total space taken or amount of computational memory needed by the algorithm to solve a problem.

Space Complexity

New cards
45

Instructions in an algorithm can be implemented in any language and produce the same results.

Language Independent

New cards
46

Data Flow of an Algorithm (enumerate)

  • Problem

  • Algorithm

  • Input

  • Processing Unit

  • Output

New cards
47

usually gives the programmer an idea of the issue at hand, the available resources and the motivation to come with a plan to solve it.

Problem

New cards
48

programmer designs the step by step procedure to solve the problem efficiently.

Algorithm

New cards
49

algorithm is designed and the relevant inputs are supplied.

Input

New cards
50

receives these inputs and processes them as per the designed algorithm.

Processing Unit

New cards
51

receive the favorable output of our problem statement

Output

New cards
52

What Makes a Good Algorithm?

• It must be correct • It must be finite (in terms of time and size) • It must terminate • It must be unambiguous • It must be space and time efficient

New cards

Explore top notes

note Note
studied byStudied by 1 person
... ago
5.0(1)
note Note
studied byStudied by 10 people
... ago
5.0(2)
note Note
studied byStudied by 672 people
... ago
4.2(5)
note Note
studied byStudied by 64 people
... ago
4.9(7)
note Note
studied byStudied by 7 people
... ago
4.0(1)
note Note
studied byStudied by 12 people
... ago
5.0(1)
note Note
studied byStudied by 31 people
... ago
5.0(1)
note Note
studied byStudied by 1152 people
... ago
5.0(4)

Explore top flashcards

flashcards Flashcard (47)
studied byStudied by 24 people
... ago
5.0(2)
flashcards Flashcard (297)
studied byStudied by 66 people
... ago
5.0(3)
flashcards Flashcard (25)
studied byStudied by 5 people
... ago
5.0(1)
flashcards Flashcard (36)
studied byStudied by 23 people
... ago
5.0(1)
flashcards Flashcard (76)
studied byStudied by 7 people
... ago
5.0(1)
flashcards Flashcard (121)
studied byStudied by 31 people
... ago
5.0(1)
flashcards Flashcard (35)
studied byStudied by 9 people
... ago
5.0(2)
flashcards Flashcard (72)
studied byStudied by 8 people
... ago
5.0(1)
robot