[Home]History of KataWordWrap

FrontPage | RecentChanges | Preferences


Revision 2 . . December 20, 2011 11:00 pm by PeterKofler
Revision 1 . . January 1, 2011 1:17 am by 173-27-154-125.client.mchsi.com
  

Difference (from prior major revision) (no other diffs)

Changed: 3c3
Problem Description

Problem Description




Removed: 9d8
Comments from those who are working on this Kata

Changed: 11c10,22
Here you could write some thoughts about what you have learnt from this Kata. If you want to discuss your approach and give some code samples, you might want to link to a new page "KataXByY?". You don't have to post all the code of your solution, or claim that it is the best possible solution. What is interesting is your insights into the problem, and decisions you made in the past.

Comments from those who are working on this Kata




Here you could write some thoughts about what you have learnt from this Kata. If you want to discuss your approach and give some code samples, you might want to link to a new page "KataXByY?". You don't have to post all the code of your solution, or claim that it is the best possible solution. What is interesting is your insights into the problem, and decisions you made in the past.

Different Languages



* Python classic recursive solution, code and some discussion [1]
* Ruby styled Regular Expression solution, code [2]
* Forth, code [3] and feedback in the newsgroup [4]
* Java various solutions, code together with discussion [5]

Different Algorithms



I (PeterKofler?) did the kata several times in Java and tried a different variants each time. The different algorithms have increased complexity in code but reduce the number of allocations. See [5] for a detailed analysis of the variants together with code. It's nice to see how the solution changes from recursive to tail recursive to a loop which can be optimised even further.


FrontPage | RecentChanges | Preferences
Search: