Skip to content

Commit 1fd5208

Browse files
authored
change hints.md format (#905)
1 parent ee32248 commit 1fd5208

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

exercises/practice/fft/.docs/hints.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# Hints
1+
## General
22

3-
## 1. DFT
4-
- This can be done straight from the definition of the DFT: `Xₖ = Σ xₙ * ℯ^(-2iπk * n/N)`
5-
- While the complexity is fixed at `O(n²)`, there are still methods to do this which are more efficient.
6-
- Loops are generally slower than matrix multiplication.
3+
- DFT
4+
- This can be done straight from the definition of the DFT: `Xₖ = Σ xₙ * ℯ^(-2iπk * n/N)`
5+
- While the complexity is fixed at `O(n²)`, there are still methods to do this which are more efficient.
6+
- Loops are generally slower than matrix multiplication.
77

8-
## 2. FFT
9-
- As stated in the introduction, this is typically done with a divide-and-conquer strategy, so recursion is likely your friend, but while loops are not ruled out (and can even be more efficient).
10-
- An outline of an algorithm is as follows:
11-
- When the length of the input vector is less than or equal to 1, return the input vector. Otherwise...
12-
- The signal is split into two parts, the elements with even indices `Xₑ` and the elements with odd indices `Xₒ`.
13-
- The FFT is run on both parts.
14-
- The vector `f(n) = ℯ^(-2iπ * n/N)` is made (with `n` running from 0 to N/2-1).
15-
- The two parts `Xₑ` and `Xₒ` are recombined into a full vector `[Xₑ + f(n) * Xₒ; Xₑ - f(n) * Xₒ]`, where the addition and multiplications are elementwise.
8+
- FFT
9+
- As stated in the introduction, this is typically done with a divide-and-conquer strategy, so recursion is likely your friend, but while loops are not ruled out (and can even be more efficient).
10+
- An outline of an algorithm is as follows:
11+
- When the length of the input vector is less than or equal to 1, return the input vector. Otherwise...
12+
- The signal is split into two parts, the elements with even indices `Xₑ` and the elements with odd indices `Xₒ`.
13+
- The FFT is run on both parts.
14+
- The vector `f(n) = ℯ^(-2iπ * n/N)` is made (with `n` running from 0 to N/2-1).
15+
- The two parts `Xₑ` and `Xₒ` are recombined into a full vector `[Xₑ + f(n) * Xₒ; Xₑ - f(n) * Xₒ]`, where the addition and multiplications are elementwise.

0 commit comments

Comments
 (0)