上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 20 下一页
摘要: Given a list of words and two wordsword1andword2, return the shortest distance between these two words in the list.For example,Assume that words =["pr... 阅读全文
posted @ 2015-09-23 01:13 茜茜的技术空间 阅读(289) 评论(0) 推荐(0) 编辑
摘要: Given an arraynums, write a function to move all0's to the end of it while maintaining the relative order of the non-zero elements.For example, givenn... 阅读全文
posted @ 2015-09-23 00:46 茜茜的技术空间 阅读(228) 评论(0) 推荐(0) 编辑
摘要: Given a string, determine if a permutation of the string could form a palindrome.For example,"code"-> False,"aab"-> True,"carerac"-> True.Hint:Conside... 阅读全文
posted @ 2015-09-23 00:23 茜茜的技术空间 阅读(238) 评论(0) 推荐(0) 编辑
摘要: Given two numbers represented as strings, return multiplication of the numbers as a string.Note: The numbers can be arbitrarily large and are non-nega... 阅读全文
posted @ 2015-09-22 12:31 茜茜的技术空间 阅读(177) 评论(0) 推荐(0) 编辑
摘要: Given a string containing just the characters'(',')','{','}','['and']', determine if the input string is valid.The brackets must close in the correct ... 阅读全文
posted @ 2015-09-22 12:06 茜茜的技术空间 阅读(164) 评论(0) 推荐(0) 编辑
摘要: Compare two version numbersversion1andversion2.Ifversion1>version2return 1, ifversion1 Integer.parseInt(v2[i])) { return 1; ... 阅读全文
posted @ 2015-09-22 09:01 茜茜的技术空间 阅读(587) 评论(0) 推荐(0) 编辑
摘要: You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ... 阅读全文
posted @ 2015-09-22 03:55 茜茜的技术空间 阅读(164) 评论(0) 推荐(0) 编辑
摘要: Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".解题思路:直接思路,不需要拐弯。按位加,用flag 记住是否有进位,有是1,没有是0, 用St... 阅读全文
posted @ 2015-09-22 03:21 茜茜的技术空间 阅读(708) 评论(0) 推荐(0) 编辑
摘要: Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at... 阅读全文
posted @ 2015-09-22 02:41 茜茜的技术空间 阅读(121) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers, find out whether there are two distinct indicesiandjin the array such that the difference betweennums[i]andnums[j]is at mo... 阅读全文
posted @ 2015-09-22 02:19 茜茜的技术空间 阅读(323) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 20 下一页