微软英文面试题目

巡山小妖精
747次浏览
2021年02月13日 13:25
最佳经验
本文由作者推荐

-

2021年2月13日发(作者:西湖袁宏道)


微软英文面试题目



发布时间


: 2010-01-12 15:43


阅读


: 413




全屏阅读




[


收藏


]






1. Algorithms





* What’s the difference between a linked list and anarray?





* Implement an algorithm to sort a linked list. Whydid you pick the method


you did?




* Implement an algorithm to sort an array. Why didyou pick the method you


did?




* Implement strstr() (or some other string libraryfunction).




* Reverse a string. Optimize for speed. Optimize forspace.




* Count the number of set bits in a number. Nowoptimize for speed. Now


optimize for size.




* How would you find a cycle in a linked list?




* Give me an algorithm to shuffle a deck of cards,given that the cards are


stored in an array of ints.




* Write a function that takes in a string parameterand checks to seewhether


or not it is an integer, and if it is then return theintegervalue.




* Write a function to print all of the permutationsof a string.




* Implement malloc.




* Write a function to print the Fibonacci numbers.




* Write a function to copy two strings, A and B. Thelast few bytes of string


A overlap the first few bytes of string B.




* How would you print out the data in a binary tree,level by level, starting at


the top?

-


-


-


-


-


-


-


-