1 2 3 4 5 6 7 8 9 10 11 |
/********************************************************************************** * This is another SDE/SDET Job Interview Programming problem. * Problem: Identify whether a math expression is legal. * input: (4-3)[4+5] * output: valid * input: {4--][4+5] * output: invalid * notes: refer to http://www.asciitable.com/ to understand why I used c-2, c-1 * + : My program does not check invalid operations such: ++, --, etc.. * + : I ll leave that to you as an exercise (: **********************************************************************************/ |
Recent Comments