To calculate the area of a rectangle you multiply the length by the width. A right-angled triangle is like half a rectangle. So to calculate the area of a triangle, you can work out the area of the ...
triangle(vertex1, get_mid(vertex1, vertex2), get_mid(vertex1, vertex3), depth - 1) triangle(vertex2, get_mid(vertex1, vertex2), get_mid(vertex2, vertex3), depth - 1 ...
On par with many of my repositories, this one didn’t start off with great ambition either. It was merely an archive of LeetCode problems and solutions. For a problem like edit distance, there are two ...
Area is the amount of space taken up by a flat shape and is calculated by counting the square units inside it; almost like the tiles on a floor. For example, if we can repeatedly fit a square with 1cm ...