COMSCI 1201 LEC (Data Structures & Algorithms)

studied byStudied by 35 people
5.0(3)
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

Tags and Description

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 3 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 18 people
Updated ... ago
5.0 Stars(2)
note Note
studied byStudied by 26 people
Updated ... ago
5.0 Stars(2)
note Note
studied byStudied by 35 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 57 people
Updated ... ago
4.0 Stars(1)
note Note
studied byStudied by 407 people
Updated ... ago
5.0 Stars(10)
note Note
studied byStudied by 76 people
Updated ... ago
5.0 Stars(2)
note Note
studied byStudied by 14123 people
Updated ... ago
4.9 Stars(100)

Explore top flashcards

flashcards Flashcard44 terms
studied byStudied by 4 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard49 terms
studied byStudied by 5 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard34 terms
studied byStudied by 89 people
Updated ... ago
5.0 Stars(8)
flashcards Flashcard38 terms
studied byStudied by 2 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard48 terms
studied byStudied by 2 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard82 terms
studied byStudied by 23 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard49 terms
studied byStudied by 9 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard38 terms
studied byStudied by 1963 people
Updated ... ago
4.5 Stars(26)