Traverse horizontally with memory