2016年1月10日

Implement strStr()

摘要: Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.Subscribeto see which comp... 阅读全文

posted @ 2016-01-10 22:50 walkwalkwalk 阅读(112) 评论(0) 推荐(0) 编辑

Remove Element

摘要: Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't mat... 阅读全文

posted @ 2016-01-10 22:44 walkwalkwalk 阅读(161) 评论(0) 推荐(0) 编辑

Remove Duplicates from Sorted Array

摘要: Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space for a... 阅读全文

posted @ 2016-01-10 22:42 walkwalkwalk 阅读(180) 评论(0) 推荐(0) 编辑

Reverse Nodes in k-Group

摘要: Given a linked list, reverse the nodes of a linked listkat a time and return its modified list.If the number of nodes is not a multiple ofkthen left-o... 阅读全文

posted @ 2016-01-10 22:39 walkwalkwalk 阅读(181) 评论(0) 推荐(0) 编辑

Swap Nodes in Pairs

摘要: 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.Your algor... 阅读全文

posted @ 2016-01-10 22:37 walkwalkwalk 阅读(177) 评论(0) 推荐(0) 编辑

Merge k Sorted Lists

摘要: Mergeksorted linked lists and return it as one sorted list. Analyze and describe its complexity.Subscribeto see which companies asked this question这道题... 阅读全文

posted @ 2016-01-10 22:34 walkwalkwalk 阅读(181) 评论(0) 推荐(0) 编辑

Generate Parentheses

摘要: Givennpairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, givenn= 3, a solution set is:"((()))... 阅读全文

posted @ 2016-01-10 22:31 walkwalkwalk 阅读(149) 评论(0) 推荐(0) 编辑

Merge Two Sorted Lists

摘要: 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.Subscribe... 阅读全文

posted @ 2016-01-10 22:28 walkwalkwalk 阅读(163) 评论(0) 推荐(0) 编辑

导航