面试者1:
1、 Taking a string which is supposed to contain a number of only ‘a’ or ‘b’. Return the number of continuous ‘a’ pieces. Eg. “aaabaababa”,return 4.
2、 Test the function.
3、 Reverse a one-way link
4、 Given cords of 2 rectangles, write a function to judge if they intersects.
5、 Test case for the function above
6、 Count continuous piece of ‘a’ in a string
7、 Return the continuous pieces of ‘a’ in a String
8、 A function takes 2 string inputs which are numbers like “1”, “2”, and its output is sum of the 2 inputs. Like “3” == Add (“1” + “2”). All inputs and output are int-string type. I asked him to test this function with some cases.
9、 A dialog have an input box and an OK button, when click OK button, there is a dialog to show the content of input box
面试者2:
1. 输入一个全部都是数字的字符串,将它每一位数字相加,直到最后只得到一个个位数。例如:输入”456”,则4+5+6=15, 1+5=6,返回6。要求:使用C#类的形式,通过类中的一个int型的属性来给出结果
2. 输入一个字符串,返回其中单词的个数(连续的字母为一个单词)。例如:输入”abc,xyz12mkw sd.”返回4(abc, xyz, mkw, sd 共4个单词)。要求:使用任何你擅长的语言来写出完整函数,函数原型为int CountWords(const char* src)