几道面试题-阿里云开发者社区

开发者社区> 开发与运维> 正文

几道面试题

简介: 面试者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的个数。

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

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

分享:
开发与运维
使用钉钉扫一扫加入圈子
+ 订阅

集结各类场景实战经验,助你开发运维畅行无忧

其他文章