[Community Puzzle] Fussy Fuzzy Matching - Puzzle discussion

Coding Games and Programming Challenges to Code Better

Send your feedback or ask for help here!

Created by @21stCenturyPeon,validated by @DeanTheMachine,@comp0zr and @kayou.
If you have any issues, feel free to ping them.

hello ! I have problem with the validator 3 (“NumberFuzz”) but no problems with any of the test cases can anyone help me please :sob:

If you want, you may send me your code via private message and I’ll take a look at it.

Edit

For those who fail Validator 3 (numberFuzz validator), the following custom case may be helpful for debugging:

Input

true
0
5
true
I'm 500 miles away from home
6
I'm 555 miles away from home
I'm 505 miles away from home
I'm 500 miles away
I'm 495 miles away from home
I'm 400 miles away from home
I'm 50 miles away from home

Output

false
true
false
true
false
false

After processing, the test result for these two strings is “true” while the “letterCase” must be initialized to true?
string 1 : “Ab100-500,EfG?h1jK 50.1000n0p. Qr5; tU5-WxYz”
string 2 : “Ea0?576!BcD.m101kJ{79}1066o100q+(Uv7)*rV102?ZyXw”

It looks like you’re asking about the last test (“Put It All Together”), right? You have to specify either the name of the case, or all the other variables (letterFuzz, numberFuzz, etc) in order for a definite answer to be given.

I assume that’s indeed the case you’re asking about, and accordingly the side-by-side comparison is as follows (I’ve added extra “#” to both strings in order to match the positions):

Ab100-500,EfG?h1##jK 50.1000n0##p. Qr5; tU5##-WxYz
Ea0##?576!BcD.m101kJ{79}1066o100q+(Uv7)*rV102?ZyXw
^^        ^^^ ^   ^^        ^   ^  ^^   ^^    ^^^^

All letter cases match where I’ve marked ^.

Yes it’s the last test ,how the position was match,with"#"?

As mentioned in the statement,

numberFuzz
The maximum permitted difference between an integer value - not the individual digits - in candidate and its counterpart in template.

For example, you should compare 100 with 0, instead of 1 with 0, 0 with ? and 0 with 5, i.e.

Ab100-500
Ea0  ?576

instead of

Ab100-500
Ea0?576

it is clear for the difference between the numbers but each digit(letter) is case sensitive (letterfuzz is true) ie for the first string ABC99 must imperatively correspond to a second string “ABC50”

Correct. If you still find instances of letters where the case isn’t matched, please provide the details and I can explain further.

The two first digits
Ab100-500,EfG?h1##jK 50.1000n0##p. Qr5; tU5##-WxYz
Ea0##?576!BcD.m101kJ{79}1066o100q+(Uv7)*rV102?ZyXw
“Ab” and “Ea” it is not the some
For that the test failed

letterCase = “true”, so case must match:
A and E are both uppercase - they match.
b and a are both lowercase - they match.

Then you must also check letterFuzz, which is 5 in this case:
Distance between A and E = 4, which doesn’t exceed 5 - they match.
Distance between b and a = 1, which doesn’t exceed 5 - they match.