Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

CS 220: DATA STRUCTURES AND ALGORITHMS.

Rating
-
Sold
-
Pages
89
Uploaded on
06-02-2023
Written in
2022/2023

A data structure is a named location that can be used to store and organize data. And, an algorithm is a collection of steps to solve a particular problem. Learning data structures and algorithms allow us to write efficient and optimized computer programs.

Show more Read less
Institution
Course

Content preview

Kalinga Institute of Industrial Technology


Data Structures are the programmatic way of storing data so that data can be
used efficiently. Almost every enterprise application uses various types of data
structures in one or the other way. This tutorial will give you a great
understanding on Data Structures needed to understand the complexity of
enterprise level applications and need of algorithms, and data structures.

A computer program is a collection of instructions to perform a specific task.
For this, a computer program may need to store data, retrieve data, and
perform computations on the data.

A data structure is a named location that can be used to store and organize
data. And, an algorithm is a collection of steps to solve a particular problem.
Learning data structures and algorithms allow us to write efficient and
optimized computer programs.

Applications of Data Structure and Algorithms
Algorithm is a step-by-step procedure, which defines a set of instructions to
be executed in a certain order to get the desired output. Algorithms are
generally created independent of underlying languages, i.e. an algorithm can
be implemented in more than one programming language.
From the data structure point of view, following are some important categories
of algorithms −
Search − Algorithm to search an item in a data structure.
Sort − Algorithm to sort items in a certain order.
Insert − Algorithm to insert item in a data structure.
Update − Algorithm to update an existing item in a data structure.
Delete − Algorithm to delete an existing item from a data structure.

,Data Definition
Data Definition defines a particular data with the following characteristics.
Atomic − Definition should define a single concept.
Traceable − Definition should be able to be mapped to some data
element.
Accurate − Definition should be unambiguous.
Clear and Concise − Definition should be understandable.

Data Object
Data Object represents an object having a data.

Data Type
Data type is a way to classify various types of data such as integer, string, etc.
which determines the values that can be used with the corresponding type of
data, the type of operations that can be performed on the corresponding type
of data. There are two data types −

 Built-in Data Type
 Derived Data Type

Built-in Data Type
Those data types for which a language has built-in support are known as
Built-in Data types. For example, most of the languages provide the following
built-in data types.

 Integers
 Boolean (true, false)
 Floating (Decimal numbers)
 Character and Strings

,Derived Data Type
Those data types which are implementation independent as they can be
implemented in one or the other way are known as derived data types. These
data types are normally built by the combination of primary or built-in data
types and associated operations on them. For example −


 List
 Array
 Stack
 Queue

Basic Operations
The data in the data structures are processed by certain operations. The
particular data structure chosen largely depends on the frequency of the
operation that needs to be performed on the data structure.

 Traversing
 Searching
 Insertion
 Deletion
 Sorting
 Merging




Arrays

Array is a container which can hold a fix number of items and these items
should be of the same type. Most of the data structures make use of arrays to
implement their algorithms. Following are the important terms to understand
the concept of Array.
Element − Each item stored in an array is called an element.
Index − Each location of an element in an array has a numerical index,
which is used to identify the element.

, Array Representation
Arrays can be declared in various ways in different languages. For illustration,
let's take C array declaration.




Arrays can be declared in various ways in different languages. For illustration,
let's take C array declaration.




As per the above illustration, following are the important points to be
considered.
Index starts with 0.
Array length is 10 which means it can store 10 elements.
Each element can be accessed via its index. For example, we can
fetch an element at index 6 as 9.

Basic Operations
Following are the basic operations supported by an array.
Traverse − print all the array elements one by one.
Insertion − Adds an element at the given index.
Deletion − Deletes an element at the given index
Search − Searches an element using the given index or by the value
Update − Updates an element at the given index.

Written for

Institution
Course

Document information

Uploaded on
February 6, 2023
Number of pages
89
Written in
2022/2023
Type
Class notes
Professor(s)
Mrs. motuani
Contains
All classes

Subjects

$22.44
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
ektadbn

Get to know the seller

Seller avatar
ektadbn Kalinga Institute of Industrial Technology
Follow You need to be logged in order to follow users or courses
Sold
1
Member since
4 year
Number of followers
1
Documents
5
Last sold
3 year ago

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions