Fix some typos (#6113)

* Fix some typos.

* Update volume.py

Co-authored-by: John Law <johnlaw.po@gmail.com>
This commit is contained in:
Shuangchi He 2022-05-01 18:44:23 +08:00 committed by GitHub
parent a7e4b2326a
commit e1ec661d4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 6 deletions

View File

@ -9,7 +9,7 @@ class ShuffledShiftCipher:
This algorithm uses the Caesar Cipher algorithm but removes the option to
use brute force to decrypt the message.
The passcode is a a random password from the selection buffer of
The passcode is a random password from the selection buffer of
1. uppercase letters of the English alphabet
2. lowercase letters of the English alphabet
3. digits from 0 to 9

View File

@ -10,7 +10,7 @@ such as: (5 + ((4 * 2) * (2 + 3)))
THESE ARE THE ALGORITHM'S RULES:
RULE 1: Scan the expression from left to right. When an operand is encountered,
push it onto the the operand stack.
push it onto the operand stack.
RULE 2: When an operator is encountered in the expression,
push it onto the operator stack.

View File

@ -11,7 +11,7 @@ algorithm which runs in nlogn and the brute-force n^2 algorithm.
def count_inversions_bf(arr):
"""
Counts the number of inversions using a a naive brute-force algorithm
Counts the number of inversions using a naive brute-force algorithm
Parameters
----------
arr: arr: array-like, the list containing the items for which the number

View File

@ -38,8 +38,8 @@ def vol_spheres_intersect(
Calculate the volume of the intersection of two spheres.
The intersection is composed by two spherical caps and therefore its volume is the
sum of the volumes of the spherical caps. First it calculates the heights (h1, h2)
of the the spherical caps, then the two volumes and it returns the sum.
sum of the volumes of the spherical caps. First, it calculates the heights (h1, h2)
of the spherical caps, then the two volumes and it returns the sum.
The height formulas are
h1 = (radius_1 - radius_2 + centers_distance)
* (radius_1 + radius_2 - centers_distance)

View File

@ -88,7 +88,7 @@ iv) a1 is corresponding equal character of a5 in palindrome with center a3 (reme
now for a5 we will calculate the length of palindromic substring with center as a5 but
can we use previously calculated information in some way?
Yes, look the above string we know that a5 is inside the palindrome with center a3 and
previously we have have calculated that
previously we have calculated that
a0==a2 (palindrome of center a1)
a2==a4 (palindrome of center a3)
a0==a6 (palindrome of center a3)