Time Complexity and Space Complexity using Big-O Notation and sort methods sort in python and notebook