Giter VIP home page Giter VIP logo

arfin-parween / amortized-analysis Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 6.19 MB

This Repository contains topics related to Amortized Analysis. Amortized analysis is like budgeting for algorithms. Instead of focusing on the worst-case scenario for each operation, it looks at the overall cost of a sequence of operations.

Home Page: https://www.youtube.com/playlist?list=PL23dd-8zssJAoje23_DLH12sJPPYez08B

License: MIT License

arfin basic-to-advance data-structures data-structures-and-algorithms dsa dsa-algorithm dsawitharfin dynamic-array programming stack-operations

amortized-analysis's Introduction

Hey There!

This Repository contains topics related to Amortized Analysis.

Amortized analysis is like budgeting for algorithms. Instead of focusing on the worst-case scenario for each operation, it looks at the overall cost of a sequence of operations. Imagine you have a data structure where some operations are more expensive than others. In amortized analysis, you distribute the total cost of all operations over each operation, providing a more balanced and realistic view of the average cost. It helps in understanding the average performance over time, even if individual operations may be costly.

Amortized analysis can be broadly classified into three types:

Aggregate Analysis:

This type of analysis calculates the average cost per operation over a sequence of operations. You sum up the total cost of all operations and then divide it by the number of operations. This gives you an average cost.

Accounting Method:

In this method, you assign different "credits" or "charges" to different operations. The idea is to ensure that the total credits always cover the total cost, providing a more balanced view of the overall performance.

Potential Method:

This approach defines a potential function that represents the accumulated "potential" energy of the data structure. The potential decreases with costly operations and increases when cheap operations are performed. The actual cost of an operation plus the change in potential gives the amortized cost.

Please start practicing to my Youtube Channel

Lectures Video Link Video PDF
1) Aggregate Analysis for Stack Operation start practicing
start practicing
2) Incrementing binary number using Aggregate Analysis start practicing
start practicing
3) Dynamic Table Using Aggregate Analysis start practicing
start practicing
4) Stack operation using accounting method start practicing
start practicing
5) Incrementing binary number using Accounting Analysis start practicing
start practicing
6) Stack operation using potential method start practicing
start practicing
7) Incrementing binary number using potential method start practicing
start practicing

Connect with me:

start practicing i._am._arfin start practicing Arfin Parween

amortized-analysis's People

Contributors

arfin-parween avatar

Stargazers

 avatar

Watchers

 avatar

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.