Marks :10
: 0 | : 1
You are given a string $$$drawString$$$, $$$numTickets$$$ ticket strings, and an integer $$$tolerance$$$,
You can change each ticket by the following ways:
A ticket is special substring if you can ignore at most $$$tolerance$$$ amount of characters from the $$$drawString$$$ to get a match with the ticket string.
You have to count the number of tickets which are special substring of $$$drawString$$$.
The first line contains an integer $$$numTickets, (0 \le numtickets \le 1000)$$$
The next $$$numtickets$$$ lines contains a string, representing $$$ticket_{i}, (0 \le |ticket_{i}| \le 200$$$
The next line contains a string $$$drawString, (0 \le |drawString| \le 200$$$
The next line contains an integer $$$tolerance, (0 \le tolerance \le 1000)$$$
Print an integer representing the number of tickets which are special substrings.
3 abcde aoc actld aabacd 1
2
6 abrrra abra codabro cadabrott caddbrott obradb abracadabral 3
4
In the first sample case:
So, the answer is 2.
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.