Skip to content

singh-shreya27/DSA

Repository files navigation

TIME COMPLEXITY:

It is not the time taken by the code to run because this time is dependent on the system.Eg: Windows might take more time to run a code as compared to Mac. It is the rate at which the time taken increases with respect to the input size.(theta graph) Three steps: 1.Always compute time complexity in terms of worst case scenario.(Best, Average, Worst) 2.Avoid constants. 3.Avoid lower values.

SPACE COMPLEXITY:

It is the memory space that a program takes. Auxiliary space(space that you take to solve the problem)+Input space(Space that you take to store the input).

Generally , most of the servers(leetcode,GFG, etc) takes 1 second for 10^8 operations. 2 seconds for 2*10^8 opeartions.

Recursion

Sorting-1:

  1. Selection sort
  2. Bubble sort
  3. Insertion sort

Sorting-2:

  1. Merge Sort
  2. Quick Sort
  3. Recursive bubble Sort

About

To maintain dsa codes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages