Data Structures
Data Structures
inserting an element at the beginning of the list is way faster in the linked list
than arrays
the larger the value of n the sqared term consumes almost 99% of time
so we can neglect 6n +12 so f(n)=5n*n
the approximate measure of time complexity is called asymptotic complexity
BIG O NOTATION
g=big o noation us used to measure the performance of any algorithm by
providing the order of groth o fthe function
it gives the upper bounf on a function by which we can make sure that the
function will never grow faster than this upper bound
we want the approximate runtime of the operations performed on data
structures we are not interested in the exact runtime
if f(n) and g(n) are the two functions, then
f(n)=o(g(n))
if there exists constants c and n0 such that f(n)=<=c*g(n), for all n>=n0
this simply means that f(n) dies not grow faster than g(n)