Click4Ai

497.

Hard

### Problem: Differential Privacy

In this problem, we will implement differential privacy to protect sensitive data.

**Example:** Consider a dataset that contains sensitive information about individuals. We want to release a summary of the data without revealing any individual information.

**Constraints:** Use NumPy to generate random data and labels. Implement the Laplace mechanism to add noise to the summary.

Test Cases

Test Case 1
Input: [1, 2, 3, 4, 5]
Expected: 3.0
Test Case 2
Input: [10, 20, 30, 40, 50]
Expected: 30.0
+ 3 hidden test cases