上一页 1 ··· 5 6 7 8 9 10 11 12 13 14 下一页
摘要: Remove all elements from a linked list of integers that have value val. ExampleGiven: 1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6, val = 6Return: 1 --> 2 -- 阅读全文
posted @ 2018-01-11 21:48 皇家大鹏鹏 阅读(117) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, determine if it has a cycle in it. Follow up:Can you solve it without using extra space? 题目要求判断链表是否有环形,题目不难,方法很巧,典型的双指针问题,一开始现实判断 阅读全文
posted @ 2018-01-10 23:31 皇家大鹏鹏 阅读(125) 评论(0) 推荐(0) 编辑
摘要: A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null. Return a deep copy 阅读全文
posted @ 2018-01-10 23:26 皇家大鹏鹏 阅读(178) 评论(0) 推荐(0) 编辑
摘要: Given a list, rotate the list to the right by k places, where k is non-negative. Example: Given 1->2->3->4->5->NULL and k = 2, return 4->5->1->2->3->N 阅读全文
posted @ 2018-01-05 15:42 皇家大鹏鹏 阅读(144) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. k is a positive integer and is less than or equal to 阅读全文
posted @ 2018-01-04 16:14 皇家大鹏鹏 阅读(125) 评论(0) 推荐(0) 编辑
摘要: Given a non-negative integer represented as a non-empty array of digits, plus one to the integer. You may assume the integer do not contain any leadin 阅读全文
posted @ 2018-01-04 15:25 皇家大鹏鹏 阅读(139) 评论(0) 推荐(0) 编辑
摘要: Implement int sqrt(int x). Compute and return the square root of x. x is guaranteed to be a non-negative integer. Example 1: Example 2: 时间复杂度:O(logn) 阅读全文
posted @ 2018-01-04 15:04 皇家大鹏鹏 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 首先要谈的是,今天的话题所聊的程序员包含哪些人? 在中国,写程序,不仅仅是一种兴趣,更多的时候,还是一种普通职业和谋生工具 大公司有厉害的程序员,优秀的架构师,但大量的小公司也有很多普通的程序员。在我这些年的工作经历中,也越来越深刻的感受到普通程序员的影响和力量。对于高阶程序员,所谓八仙过海各有神通 阅读全文
posted @ 2018-01-04 14:03 皇家大鹏鹏 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, swap every two adjacent nodes and return its head. For example,Given 1->2->3->4, you should return the list as 2->1->4->3. Your a 阅读全文
posted @ 2018-01-01 22:06 皇家大鹏鹏 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 内部实现机理 map: map内部实现了一个红黑树,该结构具有自动排序的功能,因此map内部的所有元素都是有序的,红黑树的每一个节点都代表着map的一个元素,因此,对于map进行的查找,删除,添加等一系列的操作都相当于是对红黑树进行这样的操作,故红黑树的效率决定了map的效率。 unordered_ 阅读全文
posted @ 2017-12-29 22:03 皇家大鹏鹏 阅读(644) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 14 下一页