上一页 1 ··· 8 9 10 11 12 13 14 下一页
摘要: Write a program to find the node at which the intersection of two singly linked lists begins. For example, the following two linked lists: begin to in 阅读全文
posted @ 2016-05-19 23:09 米开朗菠萝 阅读(186) 评论(0) 推荐(0)
摘要: 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 @ 2016-05-19 22:42 米开朗菠萝 阅读(199) 评论(0) 推荐(0)
摘要: Reverse a singly linked list. 阅读全文
posted @ 2016-05-18 16:59 米开朗菠萝 阅读(124) 评论(0) 推荐(0)
摘要: Write a function to delete a node (except the tail) in a singly linked list, given only access to that node. Supposed the linked list is 1 -> 2 -> 3 - 阅读全文
posted @ 2016-05-18 16:53 米开朗菠萝 阅读(143) 评论(0) 推荐(0)
摘要: Given a singly linked list, determine if it is a palindrome. Follow up:Could you do it in O(n) time and O(1) space? 阅读全文
posted @ 2016-05-18 15:29 米开朗菠萝 阅读(195) 评论(0) 推荐(0)
摘要: Given a list, rotate the list to the right by k places, where k is non-negative. For example:Given 1->2->3->4->5->NULL and k = 2,return 4->5->1->2->3- 阅读全文
posted @ 2016-05-17 22:25 米开朗菠萝 阅读(221) 评论(0) 推荐(0)
摘要: Implement strStr(). Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. 暴力 KMP 以后写。。 阅读全文
posted @ 2016-05-17 20:54 米开朗菠萝 阅读(200) 评论(0) 推荐(0)
摘要: Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [−2,1,−3,4,−1,2, 阅读全文
posted @ 2016-05-16 22:27 米开朗菠萝 阅读(126) 评论(0) 推荐(0)
摘要: Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or 阅读全文
posted @ 2016-05-16 21:32 米开朗菠萝 阅读(145) 评论(0) 推荐(0)
摘要: Given an array of integers, every element appears three times except for one. Find that single one. Note:Your algorithm should have a linear runtime c 阅读全文
posted @ 2016-05-15 21:47 米开朗菠萝 阅读(163) 评论(0) 推荐(0)
上一页 1 ··· 8 9 10 11 12 13 14 下一页