|
|
back to boardVERY SIMPLE SOLUTION. Posted by c_pp 8 Jan 2017 16:28 There only 10 situations!!!!! //1. in //2. input //3. inputon //4. inputone //5. out //6. output //7. outputon //8. outputone //9. puton //10. one Check their in inverse order. bool check(char const* s){ while(*s != '\n'){ if (s == "one") s += 3; // there s == "one" only pseudocode, you may check // as memcmp(s, "one",3) == 0 else // ...... //............. // 10 times else else if (s == "in") s +=2; else return false; } return true; } Re: VERY SIMPLE SOLUTION. Is it DFA? Re: VERY SIMPLE SOLUTION. Posted by Abid29 13 Oct 2020 00:29 thnx a lot c_pp atleast i learn something |
|
|