Explain the concept of Big-O notation and how you analyze the time and space complexity of your code.