Input 0 1 Array S S Empty Take 1 Word Left Output C Delete Word Array S Set S C 0 Push Sta Q43907574
please explain and draw stack too thanks
Input 0,1 in array S While S is not empty Take 1 word from left , output it in c Delete the word from array S and set again to S If c=’0′ Then push it to stack Else if stack is not empty then pop ‘0’ from stack else reject Accept S A.)If input is 001001110, is it rejected or not? B.)If input S, number of ‘0’ is greater than number of ‘1’, can we say that it is always rejected? C.)lf input S, number of ‘1’ is greater than number of ‘0’, can we say that it is always rejected? Show transcribed image text Input 0,1 in array S While S is not empty Take 1 word from left , output it in c Delete the word from array S and set again to S If c=’0′ Then push it to stack Else if stack is not empty then pop ‘0’ from stack else reject Accept S A.)If input is 001001110, is it rejected or not? B.)If input S, number of ‘0’ is greater than number of ‘1’, can we say that it is always rejected? C.)lf input S, number of ‘1’ is greater than number of ‘0’, can we say that it is always rejected?
Expert Answer
Answer to Input 0,1 in array S While S is not empty Take 1 word from left , output it in c Delete the word from array S and set ag…
OR