微软7.4新鲜五轮面筋

刚刚才面完五轮面试连环面的最后一面。微软面试水平还是很高的。最后一面是码农的总管,我本以为会出什么难题。结果出了一道看似很简单的题,但做了才发现,真的是直戳我的痛点(edge/corner case)。总体感觉学到了很多,高频题一道没考到,面筋里面的题也没撞到。总体来说,我觉得还是踏踏实实的把自己的缺点一个个的攻克。
Tech Screen:n个人,求有多少个两两组合之间的距离小于k的数量。要求O n^2

  1. find Kth in 2 sorted array. 要求logn+ logm。 edge case 贼头疼。
  2. 考了很多道简单的题目,很多都忘了,我记得一个是rotate single array,就主要测试知识宽度吧,tree,trie,heap,graph,array,linkedlist,stack,queue这些基本知识点都看看
  3. Maxstack, 要求不用extra space,并且保持原本的time complexity
  4. 十分简单的一道题,但是这个是针对我弱点来出的,递增的数列,固定递增一个数K,递增k,差距都是一样的,判断这个递增数列是不是合法的,不合法返回不合法的数,合法返回-1。要求logn。也是一堆edge case和思路的变换。。。
    总之,这次面试我觉得质量是很高的。题目不刁钻,但是整体结构真的很有想法,而且最后一面是根据你的弱点来出的,真的受教了orz
    发个面筋,积累下运气,希望能过呀!

补充内容
tech screen主要用n^2找出合法的两两距离。然后再用hashtable记录每个点的对应可行点,再用n^2找出每两个可行点,最后O(1) 查找第三个点是不是在里面。

也报一个面经:

第一轮: system design. First the interviewer asked me about my current company’s projects, like how to handle too many requests and multiple writing requests in the same object, etc. Then he asked me to design a mechanism to crawl two (follow up: a lot of) websites.
第二轮: coding. Implement a function to add files to a file management system.
第三轮: lunch & interview, coding. First question: serialize & deserialize a binary tree. Second question: Write a function to find spam email (emails sent from wrong names like “Micr0s0ft” or “amezon”)
第四轮: Hiring manager, coding & ask questions. Implement a calculator with +, * (, and ).

报个Azure Pie组的面经

  1. Tic tac toe state ( Win, Draw, in Progress) - https://leetcode.com/problems/valid-tic-tac-toe-state/
  2. String manipulation
  3. Reverse a string -
  4. Game very easy ( could solve using basic string manupulation/ Hashmap)

office 365的onsite

  1. Word Search https://leetcode.com/problems/word-search/
  2. Number of Islands https://leetcode.com/problems/number-of-islands/ , how to find If a point is inside a polygon or not.
  3. Simple string manipulation question
  4. queue and hashmap -return most frequent number in sliding window.