DSA Flashcards
is a way to store data
data structure
If we want to store data about people we are related to, we use a ___ ____ as the data structure
family tree
give us the possibility to manage large amounts of data efficiently for uses such as large databases and internet indexing services
Data structures
are essential ingredients in creating fast and powerful algorithms.
Data structures
In Computer Science there are two different kinds of data structures
Primitive Data Structures
Abstract Data Structures
A cooking recipe written on a piece of paper is an example of an
algorithm
are basic data structures provided by programming languages to represent single values, such as integers, floating-point numbers, characters, and booleans
Primitive Data Structures
are higher-level data structures that are built using primitive data types and provide more complex and specialized operations
Abstract Data Structures
is a set of step-by-step instructions to solve a given problem or achieve a specific goal
algorithm
DSA stands for
Data structures and algorithms
the step-by-step instructions are written in a programming language,
algorithms in Computer Science
is about finding efficient ways to store and retrieve data, to perform operations on data, and to solve specific problems
DSA
By understanding DSA, you can
Decide which data structure or algorithm is best for a given situation.
Make programs that run faster or use less memory.
Understand how to approach complex problems and solve them in a systematic way.
algorithms in this tutorial are not worth much without a __ ___ to work on
data structure
A data structure is not worth much if you cannot search through it or manipulate it efficiently using ___
algorithms
DSA is fundamental in nearly every part of
the software world:
Operating Systems
● Database Systems
● Web Applications
● Machine Learning
● Video Games
● Cryptographic Systems
● Data Analysis
● Search Engines
algorithm must consist of a
finite sequence of steps, ensuring it
concludes with a specific endpoint or
output, rather than continuing indefinitely
Finiteness
Characteristics of a Very Good Algorithm
Finiteness
Definiteness
Input/Output
Effectiveness
Generality
An algorithm must have
precise definitions for each step, with
clear and simple instructions to ensure
that every step is easily understood and
executable
Definiteness
An algorithm necessitates one or
more inputs, which are the initial values
provided before processing begins. These
inputs must fall within a specified range of
acceptable values
Input
An algorithm must generate one
or more outputs, which are the results
obtained after all steps are completed. The
connection between the inputs and the
resulting outputs should be clearly defined
Output
The stages of an algorithm
must be simple enough to be executed
within a finite time using basic
operations. Each operation should be
feasible and practical with the available
resources
Effectiveness
An algorithm should be
capable of addressing a range of
problems, not just a single specific case. It
should provide a general solution that can
handle various inputs within a defined
range or domain
Generality
A measure of the
amount of time an algorithm takes to run,
depending on the amount of data the
algorithm is working on
Time Complexity
measure of the
amount of memory an algorithm uses,
depending on the amount of data the
algorithm is working on
Space Complexity
mathematical notation
that describes the limiting behavior of a
function when the argument tends
towards a particular value or infinity. Used
in this tutorial to describe the time
complexity of an algorithm
Big O Notation
programming technique
where a function calls itself
Recursion
A method of
solving complex problems by breaking
them into smaller, more manageable
sub-problems, solving the sub-problems,
and combining the solutions. Recursion is
often used when using this method in an
algorithm
Divide and Conquer
simple and
straightforward way an algorithm can
work by simply trying all possible
solutions and then choosing the best one
Brute Force