3 ms·
> no tweet should have more than 280 characters, but you still wanted to minimize some cost based on how far your tweets were from 280 chars That immediately b
by viraptor 6y ago
> no tweet should have more than 280 characters, but you still wanted to minimize some cost based on how far your tweets were from 280 chars
That immediately brings Tex box badness to my mind. And the related line wrapping algorithm: http://www.tug.org/TUGboat/tb21-3/tb68fine.pdf http://www.tug.org/TUGboat/tb21-3/tb68fine.pdf
- gridspy 6y agoYes, dynamic programming is how I implemented line wrapping for (the help text in) SingStar PS3 also. Good spotting BTW, the line wrapping algorithm (where each tweet is a "line") is a perfect match for the post you are responding to. When doing programming competitions, you're often trying to figure out what standard algorithm is similar to the problem and how you need to tweak it to match.
- giomasce 6y agoYes, I was more or less inspired by TeX's algorithm.
- 72deluxe 6y agoThanks, an interesting paper. I wrote a word-wrapping algorithm once so this will be a good read to see how bad mine was.