Marks :10
: 28 | : 2
You are given a string $$$s$$$ consisting of lowercase Latin letters $$$(a-z)$$$. The score of a string is defined as the XOR of the frequencies of all the distinct letters in the string. You are required to handle two types of queries:
The first line of the input consists of a string $$$s$$$ $$$(1 \leq |s| \leq 10^6)$$$. The second line consists of a single integer $$$q$$$ $$$(1 \leq q \leq 10^6)$$$ $$$-$$$ the total number of queries. Then each of the next $$$q$$$ lines are queries of either of the following two types:
For each query of type 1, you should output a single integer - the XOR of the frequencies of all distinct characters in that particular substring.
tti 4 2 3 1 1 1 2 2 1 2 1 2 3
2 0
You need to login to view your submissions.
You need to login to view all submissions.
Result : Executed
Feel something is wrong with the test cases?
Result : Accepted
Test Cases :
But to Run or Submit the Problem, you need to Log In.
Continue to Log InYour challenge has been submitted successfully.
You will get a response soon via WhatsApp or Email.
Do let us know your issue.