Giter VIP home page Giter VIP logo

asd1_labo1's Introduction

ASD1_LABO1

Fonction 4 - f(..)

C'est une fonction récursive qui s'appelle 3 fois et effectue 2 additions à chaque appelle. En développant sous forme d'arbre, on peut voir que l'arbre a une profondeur de N et on se retrouve donc avec une complexité d'O(3^N).

N 5 6 7 8 9 10
Théorique 243 729 2187 6561 19683 59049
Empirique 242 728 2186 6560 19682 59048

<INSERT_GRAPHE>

Fonction 6 - random(..)

La fonction push_back possède une compléxité constante, O(1) et est executé N fois. La fonction random possède donc une complexité de O(N) * O(1) = O(N)

Constant (amortized time, reallocation may happen).

If a reallocation happens, the reallocation is itself up to linear in the entire size.

c.f. : http://www.cplusplus.com/reference/vector/vector/push_back/

N 1000 5000 10000 50000 100000 1000000
Théorique
Temps d'exécution

<INSERT_GRAPHE>

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.