Jochen's for 222

 Code:
Function a($b,$c)
  Dim $,$d,$e
  $a=0
  For Each $ in $b
    Dim $f
    For Each $d in $b
      Dim $g
      If $<$d
        For $e = $^0 to 2 Step -1
          If Right($,$e)=Left($d,$e)
            $=$+' '+$d
            $f=$f+$e+1
          EndIf
        Next
          $g=($|)-$f
          If Right($,1)=$c[1]&Left($,1)=$c[0]&$g<$a|~$a
            $a=''+$g+' '+$
EndFunction


Running Test 1...Done...Result: 11 about outside ideas
Running Test 2...Done...Result: 4 ones
Running Test 3...Done...Result: 0
Running Test 4...Done...Result: 7 aabbbb bbbbz
Running Test 5...Done...Result: 0
Running Test 6...Done...Result: 9 ayrton onset
Running Test 7...Done...Result: 6 kita tart
Running Test 8...Done...Result: 11 about outside ideas
Your solution passed all tests

Your solution passed all tests

KiXtart
KiXtart Version = 4.53
KiXGolf Script = kixgolf_A2Z.kix

Computer
OS = Windows XP Professional
CPU = Intel(R) Pentium(R) D CPU 3.20GHz
Speed = 3200 MHz
Memory = 2048 MB

KiXGolf Scoring Engine
Scoring Engine = 3.3

KiXtart Golf Score
Tournament = A-to-Z
Processing Start = 2007/09/13 07:40:20.340
Processing End = 2007/09/13 07:40:20.371
Duration = 0000/00/00 00:00:00.030
KiXGolf Score = 222

Thank you for participating in KiXtart Golf!
Press any key to continue...
_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)