You are on page 1of 8

INTRODUCTION

TOPIC1:DATA STRUCTURE :- A data structure is a specialized format for organizing, processing,


retrieving and storing data. There are several basic and advanced types of data structures, all
designed to arrange data to suit a specific purpose. Data structures make it easy for users to access and
work with the data they need in appropriate ways.

TOPIC2: ALGORITHM :- An algorithm is a procedure used for solving a problem or performing a


computation. Algorithms act as an exact list of instructions that conduct specified actions step by step
in either hardware- or software-based routines. Algorithms are widely used throughout all areas of IT.
❖ TYPES OF DATA STRUCTURES :-
▪ There are Two Types Of Data Structures:
Primitive Data Structure :- Primitive data is classified as basic data and consists of Boolean,
characters, integers, pointers, and fixed- and floating-point numbers.
➢ Examples of primitive data structure are integer, character, float.
• Non-Primitive Data Structure :- Non-primitive data structure is a type of data structure that can
store the data of more than one type.
➢ Examples of non-primitive data structure are Array, Linked list, stack.

o The Non-Primitive Data Structure is Divided Into Two Types:


• Liner Data Structure :- A Linear data structure have data elements arranged in sequential
manner and each member element is connected to its previous and next element.
▪ examples are array, stack, queue, linked list.
Non-Liner Data Structure:- A non-linear data structure is another important type in which data
elements are not arranged sequentially.
▪ Its examples are: Trees ,Graph.
NEED OF DATA STRUCTURES:-
As applications are getting complexed and amount of data is increasing day by day, there may arise the
following problem:
•Storing data. Data structures are used for efficient data persistence, such as specifying the
collection of attributes and corresponding structures used to store records in a database
management system.
•Managing resources and services. Core operating system (OS) resources and services are
enabled through the use of data structures such as linked lists for memory allocation, file
directory management and file structure trees, as well as process scheduling queues.
•Data exchange. Data structures define the organization of information shared between
applications, such as TCP/IP packets.
•Ordering and sorting. Data structures such as binary search trees -- also known as an ordered
or sorted binary tree -- provide efficient methods of sorting objects, such as character strings
used as tags. With data structures such as priority queues, programmers can manage items
organized according to a specific priority.
•Indexing. Even more sophisticated data structures such as B-trees are used to index objects,
such as those stored in a database.
•Searching. Indexes created using binary search trees, B-trees or hash tables speed the ability
to find a specific sought-after item.
•Scalability. Big data applications use data structures for allocating and managing data storage
across distributed storage locations, ensuring scalability and performance. Certain big data
programming environments -- such as Apache Spark -- provide data structures that mirror the
underlying structure of database records to simplify querying.
ADVANTAGES AND DIS-ADVANTAGES OF DATA STRUCTURE:-
Advantages:-
1) Allows easier processing of data.
2) It allows information stored on disk very efficiently.
3) These are necessary for designing an efficient algorithm.
4) It provides management of databases like indexing with the help of hash tables and arrays.
5) We can access data anytime and anywhere.
6) It is secure way of storage of data.
7) Graphs models real life problems
8) It allows processing of data on software system
Disadvantages:-
1) It is applicable only for advanced users.
2) If any issue occurs it can be solved only by experts.
3) Slow access in case of some data types
Practical use of data structure:
For fast data lookup, data indexing, Ip addressing, parsers, dynamic memory allocation,process
scheduling,dictionary, directory traversal,web crawling , organizing file hierarchy etc.
▪ TYPES OF ALGORITHM:-
▪ There are seven types of Algorithm:-
▪ Sort algorithms:-A Sorting Algorithm is used to rearrange a given array or list elements according to
a comparison operator on the elements. The comparison operator is used to decide the new order of
elements in the respective data structure:
▪ Search algorithms:-Searching Algorithms are designed to check for an element or retrieve an
element from any data structure where it is stored. Based on the type of search operation, these
algorithms are generally classified into two categories:
▪ Sequential Search AND Interval Search.
▪ Hashing:-A hashing algorithm is a cryptographic hash function. It is a mathematical
algorithm that maps data of arbitrary size to a hash of a fixed size. A hash function algorithm
is designed to be a one-way function, infeasible to invert:
▪ Dynamic Programming:-Dynamic Programming is mainly an optimization over plain recursion.
Wherever we see a recursive solution that has repeated calls for same inputs, we can optimize it using
Dynamic Programming. The idea is to simply store the results of subproblems, so that we do not have
to re-compute them when needed later. This simple optimization reduces time complexities from
exponential to polynomial.
▪ Exponential by squaring:-An exponential-time algorithm is one whose running time grows
as an exponential function of the size of its input.
▪ String matching and parsing:-Exact string matching algorithms is to find one, several, or all
occurrences of a defined string (pattern) in a large string (text or sequences) such that
each matching is perfect.
▪ Primality testing algorithms:-A primality test is an algorithm for determining whether an input
number is prime.
ADVANTAGE AND DIS-ADVANTAGE OF ALGORITHM:-
Pros or Advantages of the algorithm:
1.It is a stepwise representation of solutions to a given problem, which makes it easy to understand.
2.Every step in an algorithm has its own logical sequence so it is easy to debug.
3.By using an algorithm the problem is broken down into smaller pieces or steps hence, it is easier for
a programmer to convert it into an actual program.
4.An algorithm acts as a blueprint of a program and helps during program development.
5.An algorithm uses a definite procedure.
6.It easy to first develop an algorithm and then convert it into a flowchart and then into a computer
program.
7.It is not dependent on any programming language, so it is easy to understand for anyone even
without programming knowledge.
Cons or Disadvantages of an algorithm:
1.Algorithms are time-consuming.
2.Big tasks are difficult to put in algorithms.
3.Difficult to show branching and looping in algorithms.
4.Understanding complex logic through algorithms can be very difficult.
CONCLUSION

In these concluding notes, we go through the topics of the module again, giving a summary of
the main points of each. This module should have given you a deeper understanding of
programming, with an emphasis on the object-oriented style of programming. It should help
you move away from thinking about programming just in terms of the features of the
programming language you are using, towards thinking of it first in terms of what you want to
do to solve some problem or represent some scenario, and then in terms of how you would do
that in the programming language you are using. When writing a program you structure it by
“inventing your own instructions”, that is by writing methods, and by “inventing your own
types”, that is by writing classes. In most cases you will decide on the type and instructions you
need first by thinking about the scenario you are representing, then you program on two levels:
one (the application) makes use of your own invented types and instructions, the other
(the implementation) is the code that provides these types and instructions. In more complex
code, parts of the code may itself be further broken down into application and implementation
parts.

You might also like