Trace instructions = "GGLLGG".
Start: (0, 0), facing north. Execute: G → (0, 1). G → (0, 2). L → facing west. L → facing south. G → (0, 1). G → (0, 0).
After one cycle: position (0, 0), facing south. Back at origin, so bounded. (The direction being south would also have been enough.)
Now trace instructions = "GG". After one cycle: (0, 2), facing north. Not at origin AND facing north, so unbounded.
You iterate through the instruction string once: time. You store only position and direction: space.