Complexity analysis

shape