Translation:
Two Simple Questions
Now you have enough points to view the content below.
- Find the 1st non-duplicated character in a word, and return its index. Example:
Input: “tiktok”
Output: 1
Input: “bytedance”
Output: 0 - Merge intervals. Example:
Input: [[1,3],[2,6],[9,12]]
Output: [[1,6],[9,12]]
Input: [[4,6],[2,12],[1,3]]
Output: [[1,12]]
The above content is collected through the Internet, translated and processed by GPT.