Largest absolute group

You are given N string.The absolute score of a group of string is defined as the largest difference between ascii value of any 2 character taking in that group

Task : In a query you are given an integer K.Determine the size of largest group of string that can be formed such that the absolute score of that group is less than equal to k.
You need to solve Q such queries
Notes
Any ot the given string can be part of atmost 1 group.
The string concist of any character and not necessarily lowercae English alphabets .

hello @ikshit9

share this question link with me

i was practicing somewhere but i cant made the logic so i exit from it .Now I tried to find the same
problem but cant able to find the same problem ,that was displaying that time.

ok ,from next time onwards pls share the question link instead of screenshots.

that will help TA in validating his logic

ok sir i will take care of it

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

Hey, can you share the approach here. Its was a part of a hidden contest which is already over.