上一页 1 ··· 67 68 69 70 71 72 73 74 75 ··· 98 下一页
摘要: Implement strStr(). Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. Example 1: Example 2: Cla 阅读全文
posted @ 2018-10-06 21:38 Veritas_des_Liberty 阅读(181) 评论(0) 推荐(0) 编辑
摘要: Given an array nums and a value val, remove all instances of that value in-place and return the new length. Do not allocate extra space for another ar 阅读全文
posted @ 2018-10-06 21:17 Veritas_des_Liberty 阅读(203) 评论(0) 推荐(0) 编辑
摘要: Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length. Do not allocate extra spa 阅读全文
posted @ 2018-10-06 21:12 Veritas_des_Liberty 阅读(179) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, swap every two adjacent nodes and return its head. Example: Note: Your algorithm should use only constant extra space. You may no 阅读全文
posted @ 2018-10-05 21:52 Veritas_des_Liberty 阅读(174) 评论(0) 推荐(0) 编辑
摘要: Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Example: AC code: Runtime: 56 ms, faster than 26.25 阅读全文
posted @ 2018-10-05 21:07 Veritas_des_Liberty 阅读(119) 评论(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: A 阅读全文
posted @ 2018-10-04 10:43 Veritas_des_Liberty 阅读(185) 评论(0) 推荐(0) 编辑
摘要: Lists将元素按顺序储存在链表中. 与 向量(vectors)相比, 它允许快速的插入和删除,但是随机访问却比较慢. assign() 给list赋值 back() 返回最后一个元素 begin() 返回指向第一个元素的迭代器 clear() 删除所有元素 empty() 如果list是空的则返回 阅读全文
posted @ 2018-10-04 09:57 Veritas_des_Liberty 阅读(207) 评论(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. Example: 阅读全文
posted @ 2018-10-04 09:54 Veritas_des_Liberty 阅读(147) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, remove the n-th node from the end of list and return its head. Example: Note: Given n will always be valid. Follow up: Could you 阅读全文
posted @ 2018-10-03 22:08 Veritas_des_Liberty 阅读(147) 评论(0) 推荐(0) 编辑
摘要: Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. A mapping of digit to le 阅读全文
posted @ 2018-10-03 21:11 Veritas_des_Liberty 阅读(217) 评论(0) 推荐(0) 编辑
上一页 1 ··· 67 68 69 70 71 72 73 74 75 ··· 98 下一页