human
You are given a 0-indexed array nums of length n.

The distinct difference array of nums is an array diff of length n such that diff[i] is equal to the number of distinct elements in the suffix nums[i + 1, ..., n - 1] subtracted from the number of distinct elements in the prefix nums[0, ..., i].

Return the distinct difference array of nums.

Note that nums[i, ..., j] denotes the subarray of nums starting at index i and ending at index j inclusive. Particularly, if i > j then nums[i, ..., j] denotes an empty subarray. Handle all the edge cases and write the code in C++. Do not use any comments
gpt
--- Reasoning ---
1. Is the question multiple-choice question?
No
2. Is it implied multiple-choice question?
No
3. If two experts were independently asked the question, will the final answer be exactly the same?
No

--- Answer ---
open