https://alawirisaddam.blogspot.com/2021/03/algorithms-and-data-structure-drawing-test-5-ex-4.html