Files
CONTROLE_DEV51_JANNAIRE/Reponse.txt
2025-10-15 16:42:59 +02:00

30 lines
850 B
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Ex2 - Qualité de code
Profiler :
time ./a.out -> 0m0.004s
Pour Compiler : gcc -g -pg RacineCarree.c
Pour Profiler gprof a.out
Complexité cyclomatique de RacineCarree et RacineCarreeTab() :
racineCarree : Base 1 + boucle while + if donc on obtient une compléxité cyclomaique de M = 3.
racineCarreeTab: Base 1 + boucle for donc on obtien une compléxité cyclomaique de M = 2.
Complexité algorithmique de RacineCarree et RacineCarreeTab
racineCarree : boucle while avec un if a l'interieur O(√n)
racineCarreeTab : boucle for O(n*√M)
Ex 4
Pour Compiler : gcc -g -pg TriSpecial.c
Pour Profiler gprof a.out
Complexité cyclomaique de TriSpecial :
Base 1 + boucle de pré-calcul + if dans la boucle + if de parité + boucle de construction + if parité dindex M = 6
TrieSpecial : Avec racineCarree O(√x) : O(n·√M).