上一页 1 2 3 4 5 6 7 8 ··· 20 下一页
摘要: Given amxnmatrix, if an element is 0, set its entire row and column to 0. Do it in place.click to show follow up.Follow up:Did you use extra space?A s... 阅读全文
posted @ 2015-11-13 03:48 茜茜的技术空间 阅读(202) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, return the node where the cycle begins. If there is no cycle, returnnull.Note:Do not modify the linked list.Follow up:Can you sol... 阅读全文
posted @ 2015-11-13 02:54 茜茜的技术空间 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?解题思路:If we have 2 pointers - fast and slow... 阅读全文
posted @ 2015-11-13 02:16 茜茜的技术空间 阅读(133) 评论(0) 推荐(0) 编辑
摘要: Given an integer n, count the total number of digit 1 appearing in all non-negative integers less than or equal to n.For example:Given n = 13,Return 6... 阅读全文
posted @ 2015-10-23 01:42 茜茜的技术空间 阅读(159) 评论(0) 推荐(0) 编辑
摘要: A peak element is an element that is greater than its neighbors.Given an input array wherenum[i] ≠ num[i+1], find a peak element and return its index.... 阅读全文
posted @ 2015-10-23 01:10 茜茜的技术空间 阅读(200) 评论(0) 推荐(0) 编辑
摘要: Follow up for "Search in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time complexity? How and why?Write a function to... 阅读全文
posted @ 2015-10-22 07:58 茜茜的技术空间 阅读(476) 评论(0) 推荐(0) 编辑
摘要: Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2).You are given a target value t... 阅读全文
posted @ 2015-10-22 07:53 茜茜的技术空间 阅读(569) 评论(0) 推荐(0) 编辑
摘要: Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2).Find the minimum element.The a... 阅读全文
posted @ 2015-10-22 04:25 茜茜的技术空间 阅读(232) 评论(0) 推荐(0) 编辑
摘要: Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2).Find the minimum element.You m... 阅读全文
posted @ 2015-10-22 04:21 茜茜的技术空间 阅读(1363) 评论(0) 推荐(0) 编辑
摘要: Given an array ofnintegers wheren> 1,nums, return an arrayoutputsuch thatoutput[i]is equal to the product of all the elements ofnumsexceptnums[i].Solv... 阅读全文
posted @ 2015-10-22 03:40 茜茜的技术空间 阅读(162) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 20 下一页