SMART-X CODING CHALLENGE

Put your coding skills to the test and you could win one of our prizes!

User management is one of the basic operations in a web application. Searching or filtering by username is a usual operation. We know how easy it is to type wrongly the username, and people get frustrated because the system is not matching them. Let’s give a helpful hand!

PROBLEM:

Try to overcome potential typos in introducing the username. The particular errors in typing we are looking for are:

  1.  Missing one letter
  2.  Swap of two adjacent letters
  3.  One extra character
  4.  Replace one letter with another character

We would love to see your program written in Java and documented in English.

Here’s an example for you:

The following list of usernames can be considered as a test data set:

“saturnpig” ”broccoli” “grootapple” “taxidriver” “Incendies” “theshining” “milkduck” “flatpigeon” “temponix” “cakefigfox” “cartwheel” “biscuits” “taurusnet” singerleia” “rearwindow” “moonglade” “marramveal” “deepimpact” “foggalileo” “strawberry” “blackeye” “surfingsun” earthyegg” “flowerrye” “miranttea” “gonegirl” “maryandmax” “dogleoicat” “jupiterant” “pinecone” “hurricane” “squirrel” “rebdeestyx” “horserose” “metropolis” “orangedory” “spiritalto”

The previous described errors would mean that

  1.  “dogleocat” will be matched with “dogleoicat”
  2.  “carthweel” will be matched with “cartwheel”
  3.  “reebdeestyx” will be matched with “rebdeestyx”
  4.  “deepinpact” will be matched with “deepimpact”

But “gonnegirls” won’t match any username.

Bonus:

Identify simultaneously two different types of errors (1 and 2, 1 and 3, etc. but not 1 and 1). E.g. “mariandmaxx” will match “maryandmax”.

REWARD

Top 3 algorithms, ranked by usual quality coding criteria, will be rewarded with 100 euro.

YOUR SOLUTION

Please send us your solution to the email address: Coding.Challenge@smart-x.net.

RULES AND REGULATIONS

For more information, please read the Rules and Regulations of the competition here.