Currently I want to learn the complexity of space, I read a few of the books on it. On this I encountered this example problem. I would just like to know how to show that the following problem $\in L $ (deterministic logarithmic space).
Input: series of open or closed parentheses
Question: Are these parentheses properly balanced?
Example: $((() ()) (()))$ should be accepted but $()) ()$ should be rejected.