You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I appreciate your work and I think that It'd be nice to have the support for simple LaTeX expressions in Markdown snippets, wouldn't it?
Let's try with the following example:
Markdown code:
## Fibonacci #1
The Fibonacci sequence is defined as:
$F(0)=0$, $F(1)=1$, and $F(n)=F(n−1)+F(n−2) \quad n≥2$.
So the sequence (starting with $F(0)$) is $0,1,1,2,3,5,8,$ ...
```c
int fibonacci(int value) {
if(value == 0)
return 0;
else if(value == 1)
return 1;
else
return fibonacci(value-1)+fibonacci(value-2);
```
The **complexity** of this algorithm is $\theta(n)$ stack space and $\theta(\phi^n)$ arithmetic operations, where $\phi=\frac{\sqrt5+1}{2}$
(the golden ratio). In other words, the number of operations to compute $F(n)$ is proportional to the resulting value itself, which grows **exponentially**.
Reference: https://www.nayuki.io/page/fast-fibonacci-algorithms
The complexity of this algorithm is $\theta(n)$ stack space and $\theta(\phi^n)$ arithmetic operations, where $\phi=\frac{\sqrt5+1}{2}$
(the golden ratio). In other words, the number of operations to compute $F(n)$ is proportional to the resulting value itself, which grows exponentially.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi @antonreshetov,
I appreciate your work and I think that It'd be nice to have the support for simple
LaTeX
expressions in Markdown snippets, wouldn't it?Let's try with the following example:
Markdown code:
Snippet Rendered:
Fibonacci #1
The Fibonacci sequence is defined as:
$F(0)=0$ , $F(1)=1$ , and $F(n)=F(n−1)+F(n−2) \quad n≥2$ .
So the sequence (starting with $F(0)$) is$0,1,1,2,3,5,8,$ ...
The complexity of this algorithm is$\theta(n)$ stack space and $\theta(\phi^n)$ arithmetic operations, where $\phi=\frac{\sqrt5+1}{2}$ $F(n)$ is proportional to the resulting value itself, which grows exponentially.
(the golden ratio). In other words, the number of operations to compute
Reference: https://www.nayuki.io/page/fast-fibonacci-algorithms
Beta Was this translation helpful? Give feedback.
All reactions