diff --git a/algorithms/C/maths/fibonacci-number/README.md b/algorithms/C/maths/fibonacci-number/README.md index 7d5101c1..2af27e9a 100644 --- a/algorithms/C/maths/fibonacci-number/README.md +++ b/algorithms/C/maths/fibonacci-number/README.md @@ -1,5 +1,5 @@ # Fibonacci Number -Fibonacci numbers form a Fibonacci sequence where given any number (excluding first 2 terms) is a sum of its two preceding numbers. Usually, the sequence is either start with 0 and 1 or 1 and 1. Below is a Fibonacci sequnce starting from 0 and 1: +Fibonacci numbers form a Fibonacci sequence where given any number (excluding first 2 terms) is a sum of its two preceding numbers. Usually, the sequence is either start with 0 and 1 or 1 and 1. Below is a Fibonacci sequence starting from 0 and 1: $$ 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, \dots diff --git a/algorithms/CPlusPlus/Maths/factorial.cpp b/algorithms/CPlusPlus/Maths/factorial.cpp index 11ad4773..a97f98c1 100644 --- a/algorithms/CPlusPlus/Maths/factorial.cpp +++ b/algorithms/CPlusPlus/Maths/factorial.cpp @@ -4,8 +4,8 @@ A factorial of number 4 is calculated as: 4 X 3 X 2 X 1 = 24 Approach: Calculating factorial using for loop. -Declaring the f varialbe to 1 (not initialising it to zero because any number multiplied by 0 will be 0) -Multiplying the f variable to 1,2,3...n and storing it in the f varialbe. +Declaring the f variable to 1 (not initialising it to zero because any number multiplied by 0 will be 0) +Multiplying the f variable to 1,2,3...n and storing it in the f variable. The same factorial can be calculated using while loop, recursion. Time Complexity: O(number) diff --git a/algorithms/CPlusPlus/Recursion/first-uppercase-letter.cpp b/algorithms/CPlusPlus/Recursion/first-uppercase-letter.cpp index 2be87827..40315a35 100644 --- a/algorithms/CPlusPlus/Recursion/first-uppercase-letter.cpp +++ b/algorithms/CPlusPlus/Recursion/first-uppercase-letter.cpp @@ -1,7 +1,7 @@ /* Description: Program to print the first uppercase letter in a string -Approach: Use a varialbe to iterate over the string +Approach: Use a variable to iterate over the string Increment the iterator by 1 at every recursive call If the value of iterator reaches till the length of the string, return '\0