https://rob-bell.net/2009/06/a-beginners-guide-to-big-o-notation/