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
examples of data are:
names, ages, prices, costs, numbers of items sold, employee names, etc.
Data themselves are fairly useless, but when these data are processed or organized, they become useful and is now called__
information.
data needs to be __ to provide information.
organized
__ 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
it easy for users to access and work with the data they need in appropriate ways.
data structure
Data Structure It is not only used for organizing the data but also for ___using various algorithms.
processing, retrieving, and storing data
Data structure is classified into two types
primitive and non-primitive.
Also known as basic data structure, it contains fundamental data types that can only hold single data type values.
Primitive data structure
Examples of primitive data
integer, character, boolean, float, double, long, etc.
a data structure that focuses on forming a set or collection of data elements that is either homogeneous or heterogeneous
Non-primitive data structure
What is Homogenous and its example?
(same data type. ex. integer array num)
What is Heterogeneous
and its example?
(different data types. ex. structure Student that contains char array name, integer age, etc.)
Non-primitive data structure also known as ___, as they are derived on primitive ones.
derived data structure
A ___ can be stored using the non- primitive data structures.
large number of values
The data stored can also be manipulated using various operations like
insertion,
deletion,
searching,
sorting,
Non-primitive data structures are divided into two categories:
linear and non-linear data structures
a type of data structure in which data elements are arranged sequentially or linearly.
Linear data structure
Since elements are arranged in a sequential or particular order, linear data structure is __
easier to access.
Examples of linear data structures are__
array, stack, queue, and linked list.
When the elements of a data structure doesn't stay sequentially or linearly, the data structure is called to be __
Non-linear data structure
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
examples of non-linear data structures.
Trees and graphs
What are the Data Structure Operations ( enumerate)
Navigating
Searching
Insertion
Deletion
Sorting
Merging
Accessing each data element exactly once so that certain items in the data may be processed
Navigating
Finding the location of the data element or key in the structure.
Searching
Adding a new data element to the structure
Insertion
Removing a data element from the structure
Deletion
Arrange the data elements in a logical order (ascending/descending)
Sorting
Combining data elements from two or more data structures into one
Merging
defined as a step-by-step procedure or method with a finite set of instructions to accomplish a particular task.
algorithm
Basically, it is not the complete code, rather it is the__ that can be implemented to solve a particular problem.
logic
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.
Algorithm =
Algorithm = Input + Process + Output
What are the Characteristics of an Algorithm ( enumerate)
Unambiguous
Inputs
Outputs
Correctness
Finiteness
Effectiveness
Language Independent
Instructions in an algorithm should be clear, simple, and straightforward.
Unambiguous
An algorithm should have some input values.
Inputs
At the end of an algorithm, you must have one or more outcomes.
Outputs
An algorithm is designed correctly if it receives valid input, terminates, and always returns the correct output.
Correctness
The algorithm should contain a limited and countable number of instructions and should terminate after a finite time.
Finiteness
Each step of the algorithm should be effective and efficient enough to produce results.
Effectiveness
The effectiveness of an algorithm can be evaluated with the help of two important parameters:
Time Complexity
Space Complexity
This refers to the amount of time taken by the computer to run the algorithm.
Time Complexity
the total space taken or amount of computational memory needed by the algorithm to solve a problem.
Space Complexity
Instructions in an algorithm can be implemented in any language and produce the same results.
Language Independent
Data Flow of an Algorithm (enumerate)
Problem
Algorithm
Input
Processing Unit
Output
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
programmer designs the step by step procedure to solve the problem efficiently.
Algorithm
algorithm is designed and the relevant inputs are supplied.
Input
receives these inputs and processes them as per the designed algorithm.
Processing Unit
receive the favorable output of our problem statement
Output
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