This is a question from my assignment and I got stuck with this question for so long.
I can prove L is context-free when L is regular, but how can I prove L is regular when L is context-free. I tried to use the pumping lemma (and the Ogden lemma) but I got nothing useful. Maybe we could construct a DFA when L is context-free? or there are other ways to prove it?