vault backup: 2023-09-15 15:47:24
This commit is contained in:
parent
799201dce6
commit
04088a8ce1
14
.obsidian/workspace.json
vendored
14
.obsidian/workspace.json
vendored
@ -18,6 +18,18 @@
|
||||
"source": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "5aa49dd7e49043c7",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "markdown",
|
||||
"state": {
|
||||
"file": "Algo/Séminaire/Exercices seminaire.md",
|
||||
"mode": "source",
|
||||
"source": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -159,8 +171,8 @@
|
||||
"active": "0d2d422aa24bb900",
|
||||
"lastOpenFiles": [
|
||||
"Algo/Séminaire/Exercices seminaire.md",
|
||||
"Algo/Séminaire/Introduction.md",
|
||||
"Algo/Séminaire/Chapter 5 - Recursivity.md",
|
||||
"Algo/Séminaire/Introduction.md",
|
||||
"Algo/Séminaire/Chapter 3 - Case analysis.md",
|
||||
"Algo/Séminaire/Chapter 2 - Functions.md",
|
||||
"Algo/Séminaire/Chapter 4 - A bit of imperative.md",
|
||||
|
@ -115,3 +115,17 @@ Exemple with egypt (4.10) vs multiply (4.6):
|
||||
| b -> a +mult (b-1)
|
||||
in mult b;;
|
||||
```
|
||||
|
||||
The best algorithm in term of complexity is the parameter that is constant/linear or logarithmic. If you have an exponential algorithm, you can put it in trash :)
|
||||
|
||||
**Exemple with fibonacci algorithm**
|
||||
|
||||
| |res|how (for human) ?|How (for function) ?|
|
||||
|:----:|:----:|:----:|:----:|
|
||||
|0|1|def|1 call|
|
||||
|1|1|def|1 call|
|
||||
|2|2|+|3 calls|
|
||||
|3|3|+|5 calls|
|
||||
|4|5|+|7 calls|
|
||||
|5|8|+|9 calls|
|
||||
|6|13|+|11 calls|
|
||||
|
Loading…
x
Reference in New Issue
Block a user