Explain how you would optimize a search algorithm operating over a highly constrained, memory-limited environment.