Gettysburg Address


Gettysburg Address algorithm is an dynamic programming algorithm to re-format the Gettysburg address of Abraham Lincoln to fit in lines of 20 columns (of course this implementation can be more flexible in this). The Gettysburg address is a speech by President Abraham Lincoln after the Battle of Gettysburg, the largest battle of the American Civil War.
For example,

becomes: