当前位置:才华屋 > 职场生活百科 > 面试 > Microsoft面试试题(2)
手机版

Microsoft面试试题(2)

来源:才华屋 阅读:5.58K 次

Algorithms

Microsoft面试试题(2)

* Whats the difference between a linked list and an array?

* Implement an algorithm to sort a linked list. Why did you pick the method you did?

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

* Implement strstr() (or some other string library function).

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

* Count the number of set bits in a number. Now optimize 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 parameter and checks to see whether or not it is an integer, and if it is then return the integer value.

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

* Implement malloc.

* Write a function to print the Fibonacci numbers.

* Write a function to copy two strings, A and B. The last 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?

本文链接:https://www.caihuawu.com/zcsh/mianshi/ly4l8.html

Copyright © 2024. 才华屋 All right reserved. 黑ICP备20014756号-2

文字美图素材,版权属于原作者。部分文章内容由网友提供推送时因种种原因未能与原作者联系上,若涉及版权问题,敬请原作者联系我们,立即处理。