Exercise 1. Removing duplicates
This function returns the unique emails from sign-up data. It passes every test. Why does the API time out when the data is 1 million rows?
1. Click the faulty line.
2. What is the problem?
Each snippet below looks right and passes small tests, like much AI-written code. Find the faulty line and the kind of problem.
This function returns the unique emails from sign-up data. It passes every test. Why does the API time out when the data is 1 million rows?
1. Click the faulty line.
2. What is the problem?
This function finds a price in a sorted list. Almost every test passes, but one bug report says the page freezes for certain prices.
1. Click the faulty line.
2. What is the problem?
This endpoint shows the 50 latest orders with their customers' names. Fast on a laptop, slow in production.
1. Click the faulty line.
2. What is the problem?