上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 40 下一页
摘要: Given an array of numbersnums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements t... 阅读全文
posted @ 2015-10-12 07:40 amazingzoe 阅读(139) 评论(0) 推荐(0)
摘要: The string"PAYPALISHIRING"is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font fo... 阅读全文
posted @ 2015-10-12 07:04 amazingzoe 阅读(152) 评论(0) 推荐(0)
摘要: Givennpoints on a 2D plane, find the maximum number of points that lie on the same straight line.Runtime: 40ms 1 /** 2 * Definition for a point. 3 *... 阅读全文
posted @ 2015-10-12 06:03 amazingzoe 阅读(150) 评论(0) 推荐(0)
摘要: Divide two integers without using multiplication, division and mod operator.If it is overflow, return MAX_INT.Runtime: 8ms 1 class Solution { 2 public... 阅读全文
posted @ 2015-10-12 00:38 amazingzoe 阅读(134) 评论(0) 推荐(0)
摘要: Implement a basic calculator to evaluate a simple expression string.The expression string may contain open(and closing parentheses), the plus+or minus... 阅读全文
posted @ 2015-10-08 11:12 amazingzoe 阅读(158) 评论(0) 推荐(0)
摘要: Compare two version numbersversion1andversion2.Ifversion1>version2return 1, ifversion1 temp2) return 1;18 if(temp1 < temp2) return -1;19 ... 阅读全文
posted @ 2015-10-08 10:02 amazingzoe 阅读(150) 评论(0) 推荐(0)
摘要: Remove all elements from a linked list of integers that have valueval.ExampleGiven:1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6,val= 6Return:1 --> 2 --> 3 --... 阅读全文
posted @ 2015-10-08 09:02 amazingzoe 阅读(136) 评论(0) 推荐(0)
摘要: Given apatternand a stringstr, find ifstrfollows the same pattern.Examples:pattern ="abba", str ="dog cat cat dog"should return true.pattern ="abba", ... 阅读全文
posted @ 2015-10-07 21:08 amazingzoe 阅读(134) 评论(0) 推荐(0)
摘要: Write a program to find the node at which the intersection of two singly linked lists begins.For example, the following two linked lists:A: a... 阅读全文
posted @ 2015-10-06 22:48 amazingzoe 阅读(128) 评论(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-05 04:12 amazingzoe 阅读(113) 评论(0) 推荐(0)
上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 40 下一页