mardi 24 mars 2015

How Can We Recursively determine the positions in a string where text can break to continue on the next line?


Please take a look at the link below.


http://ift.tt/1N61Xma


I understand iterating can be one way to solve this, but I think recursion could lead to a simpler code. I'm thinking that we can split up the work in sections, with the recursive method finding the character before the line break and then taking that information into the main method to actually do the splitting. I have the concept down, but am wondering if there are programmers out there who have thought of this implementation already.





Aucun commentaire:

Enregistrer un commentaire