上一页 1 ··· 8 9 10 11 12 13 14 15 下一页
摘要: Given an array and a value, remove all instances of that value in-place and return the new length. Do not allocate extra space for another array, you 阅读全文
posted @ 2017-11-14 22:31 hozhangel 阅读(96) 评论(0) 推荐(0) 编辑
摘要: Given a sorted array, remove the duplicates in-place such that each element appear only once and return the new length. Do not allocate extra space fo 阅读全文
posted @ 2017-11-14 22:26 hozhangel 阅读(106) 评论(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 @ 2017-11-14 15:19 hozhangel 阅读(149) 评论(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 @ 2017-11-13 21:10 hozhangel 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Merge k sorted linked list就是merge 2 sorted linked l 阅读全文
posted @ 2017-11-13 20:35 hozhangel 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 在Vector容器中有以下几个关于大小的函数 方法 效果 size() 返回容器的大小 empty() 判断容器是否为空 max_size() 返回容器最大的可以存储的元素 capacity() 返回容器当前能够容纳的元素数量 LeetCode内对vector元素排序。std::sort(nums. 阅读全文
posted @ 2017-11-13 19:43 hozhangel 阅读(127) 评论(0) 推荐(0) 编辑
摘要: Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set is: 解 阅读全文
posted @ 2017-11-13 19:33 hozhangel 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 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 @ 2017-11-12 22:36 hozhangel 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 20 Valid Parentheses Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The bracke 阅读全文
posted @ 2017-11-12 20:23 hozhangel 阅读(174) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, remove the nth node from the end of list and return its head. For example, Given linked list: 1->2->3->4->5, and n = 2. After rem 阅读全文
posted @ 2017-11-11 11:28 hozhangel 阅读(154) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 下一页