Yatra.com Interview Question
Software Engineer / DevelopersCountry: India
Interview Type: In-Person
Your program may work (haven't tried it) but, we're asked to draw a DFA, and, you have separate sets of states for As and Bs. In a DFA, all information must be combined into a single state; ie you'd have to have nodes for oddA_oddB, oddA_evenB, evenA_oddB, and evenA_evenB (plus start of course, evenA_oddB is an accepting state).
Here is a sample program using five states
- raja roy January 25, 2012