Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

ENTER A SUBJECT DUM-DUM

Name: Anonymous 2007-08-24 4:27 ID:cvcO9wR4

Reverse a string. Optimize for speed. Optimize for space.

Reversing a string is simple. But now imagine you have to read a 512kb string with only 64kb of ram. Is there any way to do this efficiently?

Name: Anonymous 2007-08-24 10:45 ID:g5GfqWql

If you're on some primitive machine with only 64kb of RAM, I think most of the trickiness (in terms of speed, and also in terms of getting things to work if you truly only had 64k and were talking directly to the disk) would revolve around the string not being an even multiple of your disk's sector size.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List