由于水平原因,博客大部分内容摘抄于网络,如有错误或者侵权请指出,本人将尽快修改

上一页 1 2 3 4 5 6 7 8 9 10 ··· 13 下一页
摘要: 就是为了干倒二分题目。 题目 475. Heaters Winter is coming! Your first job during the contest is to design a standard heater with fixed warm radius to warm all the 阅读全文
posted @ 2019-06-18 22:52 小纸条 阅读(504) 评论(0) 推荐(0)
摘要: 参考链接:https://www.cnblogs.com/Kohinur/p/8947142.html 链式前向星 vector存储 阅读全文
posted @ 2019-06-10 20:24 小纸条 阅读(187) 评论(0) 推荐(0)
摘要: Given an integer n, return the number of trailing zeroes in n!. Example 1: Example 2: 题目问阶乘的结果有几个零,如果用笨方法求出阶乘然后再算 0 的个数会超出时间限制。 然后我们观察一下,5 的阶乘结果是 120, 阅读全文
posted @ 2019-06-06 14:10 小纸条 阅读(95) 评论(0) 推荐(0)
摘要: Shuffle a set of numbers without duplicates. Example: 阅读全文
posted @ 2019-06-01 15:34 小纸条 阅读(116) 评论(0) 推荐(0)
摘要: Given an array nums of n integers and an integer target, are there elements a, b, c, and d in nums such that a + b + c + d = target? Find all unique q 阅读全文
posted @ 2019-06-01 14:43 小纸条 阅读(114) 评论(0) 推荐(0)
摘要: Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the s 阅读全文
posted @ 2019-06-01 11:23 小纸条 阅读(83) 评论(0) 推荐(0)
摘要: Reverse a singly linked list. Example: Follow up: A linked list can be reversed either iteratively or recursively. Could you implement both? 阅读全文
posted @ 2019-05-31 19:21 小纸条 阅读(108) 评论(0) 推荐(0)
摘要: Given a singly linked list, determine if it is a palindrome. Example 1: Example 2: Follow up:Could you do it in O(n) time and O(1) space? (1)定义快慢指针得到链 阅读全文
posted @ 2019-05-31 19:09 小纸条 阅读(82) 评论(0) 推荐(0)
摘要: Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacen 阅读全文
posted @ 2019-05-29 17:46 小纸条 阅读(115) 评论(0) 推荐(0)
摘要: Given a non-empty array of integers, return the k most frequent elements. Example 1: Example 2: Input: nums = [1], k = 1 Output: [1] 这个题目更加像是一道语法题目。。。 阅读全文
posted @ 2019-05-28 16:48 小纸条 阅读(136) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 10 ··· 13 下一页