DSA What Is Datastructures ? Algorithim
DSA What Is Datastructures ? Algorithim
What is Datastructures ?
In simple words it is way to organise your data
types of datastructures :
Array,linkedlist,stack,binarytree,Graph,Binary Search tree.,
heap, misc, Matrix, Queue, hashing.
ALGORITHIM
Way to solve a problem or we can say a
procedure and set of rules to solve a
problem.
With Loop->
function addupto(n) {
let total = 0;
for (let i = 1; i <= n; i++) {
total += i;
}
return total;
}
console.log(addupto(6));
console.log(addupto(5));
which is better ?
the function of formula is better
Official intro
Big O Notation
Big O Notation is a way to formalize fuzzy
counting.
Example 1
Cheat sheet to identify time complexity of
different code
if you have an algorithm with O(n) time complexity and you double the size of the input data,
the time taken to execute the algorithm will also approximately double.
Simplfying Big O
Expression
Big O
Shorthands
ANALYSING PERFORMANCE OF ARRAYS AND
OBJECTS
Problem SOLVING APPROACH
Problem solving pattern
Recursion
Searching algorithim
Bubble Sort
Selection sort
Insertion Sort
Merge sort
Quick sort
Radix sort
Intro to datastructures
SPACE COMPLEXITY
How much more memory use (RAM)
Logarithms
Objects through the
lens of Big O
Arrays
Push nd pop are always faster than shift and
unshift.
Big O of array
Methods
Intro to problem
solving
Algorithm and Problem solving Patterns
Step 1 : Understand the problem
Step : 4 -
Step 5 : look back and refactor
Problem solving Patterns