Day 1 - Intro To DSA
Day 1 - Intro To DSA
and Algorithms
▪Data Structures
Objectives ▪Algorithms
Course Description
⮚Running
⮚ Manipulating Arrays
Introduction to Data Structures
• Discussion points:
Variables
Data Types
OOP Concepts (Object, class, inheritance, abstraction, inheritance, polymorphism, interface)
Data Structures
• Data structure is a particular way of storing and organizing data in a computer
so that it can be used efficiently.
• It’s a special format for organizing and storing data.
• A data structure is an arrangement of data in a computer’s memory (or
sometimes on a disk).
• Data structures include
• arrays,
• linked lists,
• stacks,
• binary trees, and hash tables, among others.
• Algorithms manipulate the data in these structures in various ways, such as
searching for a particular data item and sorting the data.
Abstract Data Types(ADTs)
▪ Abstract Data Type: is an abstraction of a data structure which provides only
the interface to which a data structure must adhere to.
The interface does not give any specific details about how something should be
implemented or in what programming language.
E.g., ADT vs Implementation
List 🡪 Dynamic array or linked list
Queue 🡪 Linked List, Array, Stack
Map 🡪 Tree Map, Hash Map or Hash Table
▪Roughly speaking, it’s a way of looking at a data structure: focusing on what it
does and ignoring how it does its job
What is a Data Structure in Java?
▪Data structure refers to a data collection with well-defined operations and
behavior or properties.
▪A data structure is a unique way of storing or organizing the data in computer
memory so that we can use it effectively.
For example: