90 Day Challenge
A data structure is a storage that is used to store and organize data. It is a way of arranging data on a computer so that it can be accessed and updated efficiently.
An algorithm is a step by step method of solving a problem or manipulating data. It defines a set of rules for a computer program to accomplisha task.
Example: Input ---> calculation -----> Stop When answer fond.
Repeat Defination q1 and q2
Primitive data structures allow storing only one value at a particular location. Primitive data structures of any programming language are the data types that are predefined in that programming language.
1. Brute Force Algorithm
2. Recursive Algorithm
3. Randomized Algorithm
4. Sorting Algorithm
5. Searching Algorithm
6. Hashing Algorithm
Arrays are defined as the collection of similar type of data items stored at contiguous memory location. Array is the simplest data structure where each data element can be accessed by using its index number.
There are majorly two types of arrays
1. One-Dimensional Arrays: A One-Dimensional Array is the simplest form of an Array in which the elements are stored linearly and can be accessed individually by specifying the index value of each element stored in the array.
2. Multi-Dimensional Arrays: A multi-dimensional array can be termed as an array of arrays that stores homogeneous data in tabular form. Data in multidimensional arrays are stored in row-major order.
When we create an array , we
> Assign it to a variable
> Define the type of elements that it will store
> Define the size (the max number of elements)
from array import*
arrayName = array (typecode, [Initializers])
Example:
``from array import *
myArray = array('i',[1,2,34,55,6,87,])
print(type(myArray))
print(myArray)
UNDERSTAND THE PROBLEM
EXPLORE EXAMPLE
BREAK IT DOWN
SOLVE / SIMPLIFY
LOOK BACK REFACTOR