2020年7月26日

299. Bulls and Cows

摘要: You are playing the following Bulls and Cows game with your friend: You write down a number and ask your friend to guess what the number is. Each time 阅读全文

posted @ 2020-07-26 21:11 wsw_seu 阅读(108) 评论(0) 推荐(0) 编辑

leetcode microsoft

摘要: https://leetcode.com/discuss/interview-question/398023/Microsoft-Online-Assessment-Questions 阅读全文

posted @ 2020-07-26 20:10 wsw_seu 阅读(102) 评论(0) 推荐(0) 编辑

面试题 02.04. 分割链表

摘要: 编写程序以 x 为基准分割链表,使得所有小于 x 的节点排在大于或等于 x 的节点之前。如果链表中包含 x,x 只需出现在小于 x 的元素之后(如下所示)。分割元素 x 只需处于“右半部分”即可,其不需要被置于左右两部分之间。 示例: 输入: head = 3->5->8->5->10->2->1, 阅读全文

posted @ 2020-07-26 19:48 wsw_seu 阅读(174) 评论(0) 推荐(0) 编辑

295. Find Median from Data Stream

摘要: Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two 阅读全文

posted @ 2020-07-26 19:23 wsw_seu 阅读(189) 评论(0) 推荐(0) 编辑

动态规划题解(转)

摘要: 动态规划算法似乎是一种很高深莫测的算法,你会在一些面试或算法书籍的高级技巧部分看到相关内容,什么状态转移方程,重叠子问题,最优子结构等高大上的词汇也可能让你望而却步。 而且,当你去看用动态规划解决某个问题的代码时,你会觉得这样解决问题竟然如此巧妙,但却难以理解,你可能惊讶于人家是怎么想到这种解法的。 阅读全文

posted @ 2020-07-26 18:16 wsw_seu 阅读(320) 评论(0) 推荐(0) 编辑

导航