代码改变世界

阅读排行榜

[LeetCode] 16. 3Sum Closest_Medium tag: Array, Two pointers

2019-06-05 12:00 by Johnson_强生仔仔, 181 阅读, 收藏,
摘要: Given an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of the thr 阅读全文

[LeetCode] 209. Minimum Size Subarray Sum_Medium

2018-06-16 03:00 by Johnson_强生仔仔, 180 阅读, 收藏,
摘要: Given an array of n positive integers and a positive integer s, find the minimal length of a contiguous subarray of which the sum ≥ s. If there isn't 阅读全文

[LeetCode] 173. Binary Search Tree Iterator_Medium_tag: Binary Search Tree

2019-11-17 00:47 by Johnson_强生仔仔, 179 阅读, 收藏,
摘要: mplement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST. Calling next() will return the ne 阅读全文

[LeetCode] 492. Construct the Rectangle_Easy tag: Math

2018-08-28 23:20 by Johnson_强生仔仔, 178 阅读, 收藏,
摘要: For a web developer, it is very important to know how to design a web page's size. So, given a specific rectangular web page’s area, your job by now i 阅读全文

[LeetCode] 476. Number Complement_Easy tag: Bit Manipulation

2018-08-18 11:14 by Johnson_强生仔仔, 178 阅读, 收藏,
摘要: 这个题目思路就是比如101 的结果是010, 可以从111^101 来得到, 那么我们就需要知道刚好比101多一位的1000, 所以利用 while i <= num : i <<= 1, 去得到1000, 然后-1, 便得到111, 再跟num ^, 也就是异或即可. Code 阅读全文
上一页 1 ··· 53 54 55 56 57 58 59 60 61 ··· 78 下一页