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 (: **********************************************************************************/ |
Category Programming
Problem
1 2 3 4 5 6 7 8 |
//----------------------------------------------------------------------------------------------------------- // This is another SDE Job Interview programming problem. // Problem: Given an array of int {1,2,3,4,5,6,7,8,9...} build a function to swap its item. // // input: 1 2 3 4 5 6 7 8 9 0 // output: 0 9 8 7 6 5 4 3 2 1 // //---------------------------------------------------------------------------------------------------- |
Recent Comments