Thanks, I got it.
It sounds like an external memory algorithm is needed,
which uses limited memory and makes use of the space of disk (SD/SDHC card) to accomplish the task.
We don't have memory, but we have disks.
Any temporary data could be stored temporarily in the SD card,
the number of I/O should be minimized to obtain a fast running time.