Weekend Programming Challenge Issue #3


Image

Problem:

Let’s have N different strings/words for each word print the minimum part of it which makes it unique toward others, for example:

input:
A13-OLinuXino
iMX233-OLinuXino
MOD-PULSE
MOD-IO
<end>

result:
A13-OLinuXino -> a
iMX233-OLinuXino -> 2
MOD-PULSE -> p
MOD-IO -> -i

i.e. if you search for “a” in all words you will find it only in “A13-OLinuXino”, if you search for “2” in all words you will find it only in “iMX233-OLinuXino” and so on.

The rules

You can code the solution in any language during the weekend and have to submit it to info@olimex.com latest on Sunday April 7th .

On Monday we will upload the solutions on GitHub and review https://github.com/OLIMEX/WPC .

You can play with your real name or with nick if you want to be anonymous, we will not disclosure your personal info if you do not want to.

Good Luck and Have fun!

6 Comments (+add yours?)

  1. sinan
    Apr 05, 2013 @ 18:49:48

    The second symbol in the first word (the number 1) is also unique, right?

    Reply

  2. ventosus
    Apr 06, 2013 @ 13:16:00

    shouldn’t it read MOD-iO, or MOD-io, because the minimum part of MOD-IO would be I?

    Reply

  3. Trackback: Ollimex – WPC #3 | friemeln
  4. Trackback: Performance matters. | Few words about Linux and embedded devices

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: