上一页 1 ··· 59 60 61 62 63 64 65 66 67 ··· 77 下一页
摘要: [抄题]: Given a binary search tree with non-negative values, find the minimum absolute difference between values of any two nodes. Example: [暴力解法]: 时间分析 阅读全文
posted @ 2018-03-14 10:06 苗妙苗 阅读(191) 评论(0) 推荐(0)
摘要: [抄题]: Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight). For example, the 3 阅读全文
posted @ 2018-03-13 22:16 苗妙苗 阅读(127) 评论(0) 推荐(0)
摘要: [抄题]: The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two integers x and y, 阅读全文
posted @ 2018-03-13 21:48 苗妙苗 阅读(243) 评论(0) 推荐(0)
摘要: [抄题]: Given an array of integers, every element appears twice except for one. Find that single one. Note:Your algorithm should have a linear runtime c 阅读全文
posted @ 2018-03-13 21:38 苗妙苗 阅读(139) 评论(0) 推荐(0)
摘要: [抄题]: There is a fence with n posts, each post can be painted with one of the k colors. You have to paint all the posts such that no more than two adj 阅读全文
posted @ 2018-03-13 20:36 苗妙苗 阅读(273) 评论(0) 推荐(0)
摘要: [抄题]: There are a row of n houses, each house can be painted with one of the three colors: red, blue or green. The cost of painting each house with a 阅读全文
posted @ 2018-03-13 15:41 苗妙苗 阅读(250) 评论(0) 推荐(0)
摘要: [抄题]: On a staircase, the i-th step has some non-negative cost cost[i] assigned (0 indexed). Once you pay the cost, you can either climb one or two st 阅读全文
posted @ 2018-03-13 11:52 苗妙苗 阅读(141) 评论(0) 推荐(0)
摘要: Immutable [抄题]: Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. Example: [暴力解法]: 时间分析:n 空间分析:n [ 阅读全文
posted @ 2018-03-13 10:09 苗妙苗 阅读(255) 评论(0) 推荐(0)
摘要: [抄题]: Design a logger system that receive stream of messages along with its timestamps, each message should be printed if and only if it is not printe 阅读全文
posted @ 2018-03-12 21:48 苗妙苗 阅读(310) 评论(0) 推荐(0)
摘要: [抄题]: Given a stream of integers and a window size, calculate the moving average of all integers in the sliding window. For example, [暴力解法]: 时间分析: 空间分 阅读全文
posted @ 2018-03-12 20:31 苗妙苗 阅读(179) 评论(0) 推荐(0)
上一页 1 ··· 59 60 61 62 63 64 65 66 67 ··· 77 下一页