2道面试题

简介: 面试者1: 1、 Taking a string which is supposed to contain a number of only ‘a’ or ‘b’.

面试者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)

目录
相关文章
|
6月前
|
消息中间件 存储 NoSQL
面试题30天打卡-day23
面试题30天打卡-day23
15 0
|
6月前
|
NoSQL Java 编译器
面试题30天打卡-day26
面试题30天打卡-day26
21 0
|
6月前
|
安全 Java 关系型数据库
面试题30天打卡-day10
面试题30天打卡-day10
27 0
|
6月前
|
消息中间件 设计模式 关系型数据库
面试题30天打卡-day08
面试题30天打卡-day08
14 0
|
8月前
|
缓存 JavaScript 前端开发
【面试题总结】
【面试题总结】
|
3月前
|
网络协议 NoSQL 数据库
C++面试题
C++面试题
|
6月前
|
SQL Java 关系型数据库
面试题30天打卡-day09
面试题30天打卡-day09
28 0
|
6月前
|
NoSQL 前端开发 Java
面试题30天打卡-day12
面试题30天打卡-day12
19 0
|
7月前
|
存储 缓存 NoSQL
【面试题系列】(一)
【面试题系列】(一)
|
8月前
|
缓存 前端开发 JavaScript
【面试题2】1
【面试题2】