Duplicate keys break reconciliation. Input: a JSON array of keys. Print ok if all unique, otherwise print the duplicated keys (first-seen order of duplication), comma-separated.
Input: one JSON array.
Output: ok or duplicate list.
Your program reads from stdin and prints to stdout.
Example 1
Input: ["a","b","c"]
Output: ok
Hints
Duplicate keys break reconciliation. Input: a JSON array of keys. Print ok if all unique, otherwise print the duplicated keys (first-seen order of duplication), comma-separated.
Input: one JSON array.
Output: ok or duplicate list.
Your program reads from stdin and prints to stdout.
Example 1
Input: ["a","b","c"]
Output: ok
Hints