Skip to content

Commit a88c45a

Browse files
committed
Fix typos.
1 parent 12d649e commit a88c45a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ algorithm is an abstraction higher than a computer program.
150150
* `B` [Rain Terraces](src/algorithms/uncategorized/rain-terraces) - trapping rain water problem
151151
* `A` [Maximum Subarray](src/algorithms/sets/maximum-subarray)
152152
* `A` [Travelling Salesman Problem](src/algorithms/graph/travelling-salesman) - shortest possible route that visits each city and returns to the origin city
153+
* `A` [Discrete Fourier Transform](src/algorithms/math/fourier-transform) - decompose a function of time (a signal) into the frequencies that make it up
153154
* **Greedy** - choose the best option at the current time, without any consideration for the future
154155
* `B` [Jump Game](src/algorithms/uncategorized/jump-game)
155156
* `A` [Unbound Knapsack Problem](src/algorithms/sets/knapsack-problem)

src/algorithms/math/fourier-transform/discreteFourierTransform.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import ComplexNumber from '../complex-number/ComplexNumber';
1111
*/
1212
export default function discreteFourierTransform(inputSignalAmplitudes) {
1313
const N = inputSignalAmplitudes.length;
14-
const outpuFrequencies = [];
14+
const outputFrequencies = [];
1515

1616
// For every frequency discrete...
1717
for (let frequencyValue = 0; frequencyValue < N; frequencyValue += 1) {
@@ -48,8 +48,8 @@ export default function discreteFourierTransform(inputSignalAmplitudes) {
4848
// Average contribution at this frequency
4949
signal = signal.divide(N);
5050

51-
outpuFrequencies[frequencyValue] = signal;
51+
outputFrequencies[frequencyValue] = signal;
5252
}
5353

54-
return outpuFrequencies;
54+
return outputFrequencies;
5555
}

0 commit comments

Comments
 (0)