几道面试题

来源:互联网 发布:磁盘元数据测试0x32 编辑:程序博客网 时间:2024/06/04 19:07

面试者1:
第一轮
1. Implement a LinkedList that can add and delete nodes.
第二轮
2. Given a sorted integer array, remove duplicate items, return the count of distinct items.

 

面试者2:
第一轮
1.将一个整数转换成二进值数值后1的个数。例如0->00000000返回0
5->00000101返回2
2.压缩算法,将一个数组中重复的数字删除,并返回新数组的长度
3.multithread中critical session和mutex的区别
第二轮
1.CompactArray
删除一个有序数组中所有重复的数字,例如1 1 1 2 3 4 5 5 6 输出1 2 3 4 5 6

2.NumberOfTrue
返回一个整形数字对应的二进制数字中的1的个数,例如:0(00000000) 输出0
2(00000010)输出1
5(00000101)输出2


面试者3:
1. Write out an implementation of Linked List using C#, containing the following actions: add, remove; containing the following properties: count.
 
2. Assume you have two arrays with integer elements, a[] and b[]. array a has m elements, array b has n elements, array a has enough spaces to contain all elements that from array a and array b, write a function to merge the array b to array a, as well as removing the duplicated elements from array b to array a. using the following prototype. array a and array b are sorted ascending.
 
int MergeArray(int a[], int m, int b[], int n);
 
3. Write a function to remove all duplicates in a single array which is sorted ascending. using the following prototype.
 
void CompactArray(int a[], int length)
 
4. Given an integer array, find out the 2 maximum numbers from this array.
 
NOTE: all implementations to the questions need to be optimized mostly.


面试题目
what do you do in your team
how do you like your work,
design and refactoring which do you like
1.一个textfile,里面有很多字符。使用;分割每个部分,写代码读取这个文件,实现Addition, Modification, Deletion操作,并且存储到文件中
例如 aa;bb;增加一段(cc)变成aa;bb;cc;
2.select the 41st top record of a table
3. diffenent between viewstate and session

0 0