Scientists at the University of Technology Sydney found that healthy diets can improve memory, while sugary foods may cause lasting damage to brain function.