上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 15 下一页
摘要: 题目描述:(链接)Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.... 阅读全文
posted @ 2015-11-05 23:22 skycore 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 题目描述:(链接)Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be i... 阅读全文
posted @ 2015-11-05 22:59 skycore 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 题目描述:(链接)Given a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.If the last... 阅读全文
posted @ 2015-11-04 16:05 skycore 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 题目描述:(链接)Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.解题思路: 1 class Sol... 阅读全文
posted @ 2015-11-03 16:27 skycore 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 题目描述: (链接)GivennumRows, generate the firstnumRowsof Pascal's triangle.For example, givennumRows= 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1], [... 阅读全文
posted @ 2015-11-03 15:52 skycore 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 题目描述:(链接)Write an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row are sort... 阅读全文
posted @ 2015-11-02 23:34 skycore 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 题目描述:(链接)Given a linked list, swap every two adjacent nodes and return its head.For example,Given1->2->3->4, you should return the list as2->1->4->3.Y... 阅读全文
posted @ 2015-11-01 18:13 skycore 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 1. 顶层const表示指针本身是个常量,而底层const表示指针所指向的对象是一个常量,顶层const可以适用于任何数据类型,而底层const只能用于指针和引用等符合类型;2. 声明constexpr类型时由编译器来验证变量是否是一个常量表达式,constexpr定义了一个常量,只能由字面值类型来... 阅读全文
posted @ 2015-10-30 20:40 skycore 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 题目描述:(链接)Given a linked list, remove thenthnode from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. ... 阅读全文
posted @ 2015-10-28 19:33 skycore 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 题目描述:(链接)Given a list, rotate the list to the right bykplaces, wherekis non-negative.For example:Given1->2->3->4->5->NULLandk=2,return4->5->1->2->3->N... 阅读全文
posted @ 2015-10-27 23:33 skycore 阅读(145) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 15 下一页