Fix typo: "Excercise" => "Exercise" (#24064)
parent
6027a29b7b
commit
f24303d8e7
|
@ -53,7 +53,6 @@ void flood_fill(int pos_x, int pos_y, int target_color, int color)
|
|||
|
||||
}
|
||||
|
||||
|
||||
```
|
||||
|
||||
As seen above, my starting point is (4,4). After calling the function for the start coordinates **x = 4** and **y = 4**,
|
||||
|
@ -63,7 +62,7 @@ and start checking the other adiacent squares.
|
|||
Going south we will get to point (5,4) and the function runs again.
|
||||
|
||||
|
||||
### Excercise problem
|
||||
### Exercise problem
|
||||
|
||||
I always considered that solving a (or more) problem/s using a newly learned algorithm is the best way to fully understand
|
||||
the concept.
|
||||
|
@ -72,7 +71,7 @@ So here's one:
|
|||
|
||||
**Statement:**
|
||||
|
||||
In a bidimensional array you are given n number of **"islands"**. Try to find the largest area of an island and
|
||||
In a bidimensional array you are given n number of **"islands"**. Try to find the largest area of an island and
|
||||
the corresponding island number. 0 marks water and any other x between 1 and n marks one square from the surface corresponding
|
||||
to island x.
|
||||
|
||||
|
@ -106,7 +105,3 @@ The problem is quite easy, but here are some hints:
|
|||
|
||||
1. Use the flood-fill algorithm whenever you encounter a new island.
|
||||
2. As opposed to the sample code, you should go through the area of the island and not on the ocean (0 tiles).
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue