Skip to content

Commit 31b34af

Browse files
authored
Correct grammar in backtracking/n_queens_math.py (TheAlgorithms#4869)
1 parent 6341f35 commit 31b34af

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

backtracking/n_queens_math.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
r"""
22
Problem:
33
4-
The n queens problem is of placing N queens on a N * N chess board such that no queen
4+
The n queens problem is: placing N queens on a N * N chess board such that no queen
55
can attack any other queens placed on that chess board. This means that one queen
66
cannot have any other queen on its horizontal, vertical and diagonal lines.
77
@@ -31,7 +31,7 @@
3131
other we know that at least the queens can't attack each other in horizontal and
3232
vertical.
3333
34-
At this point we have that halfway completed and we will treat the chessboard as a
34+
At this point we have it halfway completed and we will treat the chessboard as a
3535
Cartesian plane. Hereinafter we are going to remember basic math, so in the school we
3636
learned this formula:
3737
@@ -47,7 +47,7 @@
4747
See::
4848
https://www.enotes.com/homework-help/write-equation-line-that-hits-origin-45-degree-1474860
4949
50-
Then we have this another formula:
50+
Then we have this other formula:
5151
5252
Slope intercept:
5353
@@ -59,7 +59,7 @@
5959
6060
y - mx = b
6161
62-
And like we already have the m values for the angles 45º and 135º, this formula would
62+
And since we already have the m values for the angles 45º and 135º, this formula would
6363
look like this:
6464
6565
45º: y - (1)x = b
@@ -71,7 +71,7 @@
7171
y = row
7272
x = column
7373
74-
Applying this two formulas we can check if a queen in some position is being attacked
74+
Applying these two formulas we can check if a queen in some position is being attacked
7575
for another one or vice versa.
7676
7777
"""

0 commit comments

Comments
 (0)