Giter VIP home page Giter VIP logo

dsa's Introduction

Algorithms and Data Structure

Algorithms And DataStructure

Topics

Sorting (selection, insertion, merge, heap, etc.) Stacks & Queues Linked Lists Trees & Graphs (binary trees, binary search trees, etc.) Hash tables Bit manipulation Dynamic Programming Backtracking

Asymptotic Notation

Big Oh Notation (O):

Formula: fn(n) = O(g(n)) Case: Worst case Upper Bound: c.g(n) (Function never grows faster than the upper bound) Must true: fn(n) <= c.g(n)

For all n >= no (N not) and c > 0 c must be equal to or greater than 0 no must be greator than 0 (Positive number)

Omega Notation(Ω):

Formula: fn(n) = Ω(g(n)) Case: Best case Lower Bound: c.g(n) (Function never grows slowest than the lower bound) Must true: fn(n) >= c.g(n)

For all n >= no (N not) and c > 0 c must be equal to or greater than 0 no must be greator than 0 (Positive number)

Theta Notation (θ):

Formula: fn(n) = θ(g(n)) Case: Average case Lower and Upper Bound: c1.g(n) and c2.g(n) (Function never grows slowest/faster than the lower bound and upper bound) Must true: c1.g(n) <= fn(n) <= c2.g(n)

For all n >= no (N not) and c > 0 c must be equal to or greater than 0 no must be greator than 0 (Positive number)

Common Asymptotic Notations
  • constant − Ο(1)
  • logarithmic − Ο(log n)
  • linear − Ο(n)
  • n log n − Ο(n log n)
  • quadratic − Ο(n2)
  • cubic − Ο(n3)
  • polynomial − nΟ(1)
  • exponential − 2Ο(n)

Greedy approach

  • Travelling Salesman Problem
  • Prim's Minimal Spanning Tree Algorithm
  • Kruskal's Minimal Spanning Tree Algorithm
  • Dijkstra's Minimal Spanning Tree Algorithm
  • Graph - Map Coloring
  • Graph - Vertex Cover
  • Knapsack Problem
  • Job Scheduling Problem

divide-and-conquer approach

  • Merge Sort
  • Quick Sort
  • Binary Search
  • Strassen's Matrix Multiplication
  • Closest pair (points)

dynamic programming approach

  • Fibonacci number series
  • Knapsack problem
  • Tower of Hanoi
  • All pair shortest path by Floyd-Warshall
  • Shortest path by Dijkstra
  • Project scheduling

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.