Skip to content

Instantly share code, notes, and snippets.

View yash786agg's full-sized avatar
:bowtie:
Exploring life by doing new stuff everyday

Yash Agarwal yash786agg

:bowtie:
Exploring life by doing new stuff everyday
View GitHub Profile
class SimMatcherImpl: SimMatcher {
/**
* This method should return a positive comparison score between candidates.
*
* The score is calculated as the difference between the candidate's 'signature'.
*
* A ‘signature’ is calculated by summing the values of each character in a candidate’s full name,
* where a=1, b=2, c=3, and so on. Don't worry about accented characters (á, é), they don't appear.
*
* E.g., If a candidate is called “Thales Lima”, his signature will be 100.