CT2212

Tracker and the Brass verses

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Tracker the paymaster watches over the coral atoll of Pearldeep's stores of verses. A careful computation stands between order and chaos. Task: Print the first character of s that occurs exactly once. If none exists, print -1. Input format: One line with a single lowercase string s. Output format: Print a single character or -1. Constraints: 1 <= |s| <= 191; s contains lowercase English letters.

Example 1:

Input: mblmhxrxspwhnjdgkepsoapkyellurlqamgeawmvlxsqxrgzsglnsoofjxkrxhudl
Output: b

Example 2:

Input: ysicoisvtqmrawglbjklkxpctfqrgbwsnaksevbysfibfxuouljpecyrnlkjihnkogtuzciafvzubtdnaljtlofhsddknzuqjziifaquhfvcckofwmbpkzwqtkppdctdpmajhhzfhynrqzjkngkk
Output: -1

Example 3:

Input: vbgyqjtqgmmdjftgekefkktwbphckczgyegkbpbmujahvpccbfaoydwvdujtgnomlwxjyqoskasutmijbisdxnxkjneuryqyq
Output: z

Constraints:

1 <= |s| <= 191; s contains lowercase English letters.

Loading...
Test Cases:No test cases
No test cases available.
Tracker and the Brass verses - EASY Coding Problem | CodeTikki