01 2015 档案

摘要:Write a function to find the longest common prefix string amongst an array of strings.即找出一组字符串的最长公共前缀。public class Solution { public String longest... 阅读全文
posted @ 2015-01-31 11:36 mrpod2g 阅读(163) 评论(0) 推荐(0)
摘要:最近网上都搜不到Taylor的歌了,分享一张love best的album给大家,支持霉霉的还是去买正版把~专辑曲目:01. “Jump Then Fall” 03:5702. “Untouchable” 05:1103. “Forever & Always” (Piano Version) 04:... 阅读全文
posted @ 2015-01-30 14:40 mrpod2g 阅读(232) 评论(0) 推荐(0)
摘要:Implementatoito convert a string to an integer.Hint:Carefully consider all possible input cases. If you want a challenge, please do not see below and ... 阅读全文
posted @ 2015-01-30 11:34 mrpod2g 阅读(129) 评论(0) 推荐(0)
摘要:Determine whether an integer is a palindrome. Do this without extra space.方法一:public class Solution { public boolean isPalindrome(int x) { S... 阅读全文
posted @ 2015-01-29 22:19 mrpod2g 阅读(130) 评论(0) 推荐(0)
摘要:Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321解法一:public class Solution { public int reverse(int x) { ... 阅读全文
posted @ 2015-01-28 22:34 mrpod2g 阅读(146) 评论(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-01-28 18:23 mrpod2g 阅读(161) 评论(0) 推荐(0)
摘要:Given an indexk, return thekthrow of the Pascal's triangle.For example, givenk= 3,Return[1,3,3,1].完成Pascal's Triangle问题,这个就不难了吧~ 1 public class Soluti... 阅读全文
posted @ 2015-01-26 21:18 mrpod2g 阅读(153) 评论(0) 推荐(0)
摘要:GivennumRows, generate the firstnumRowsof Pascal's triangle.For example, givennumRows= 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1]... 阅读全文
posted @ 2015-01-26 21:06 mrpod2g 阅读(133) 评论(0) 推荐(0)
摘要:Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: Pana... 阅读全文
posted @ 2015-01-26 19:23 mrpod2g 阅读(123) 评论(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-01-26 16:40 mrpod2g 阅读(118) 评论(0) 推荐(0)
摘要:Given an integern, return the number of trailing zeroes inn!.Note:Your solution should be in logarithmic time complexity.public class Solution { pu... 阅读全文
posted @ 2015-01-25 20:20 mrpod2g 阅读(96) 评论(0) 推荐(0)
摘要:Related to questionExcel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its corresponding column number.For example: A ... 阅读全文
posted @ 2015-01-20 18:02 mrpod2g 阅读(108) 评论(0) 推荐(0)
摘要:Compare two version numbersversion1andversion2.Ifversion1>version2return 1, ifversion1first2){ return 1; } else if(first1<fir... 阅读全文
posted @ 2015-01-20 10:02 mrpod2g 阅读(199) 评论(0) 推荐(0)
摘要:Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -- Removes... 阅读全文
posted @ 2015-01-17 15:34 mrpod2g 阅读(160) 评论(0) 推荐(0)
摘要:Given a positive integer, return its corresponding column title as appear in an Excel sheet.For example: 1 -> A 2 -> B 3 -> C ... 26 ->... 阅读全文
posted @ 2015-01-13 17:01 mrpod2g 阅读(125) 评论(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-01-11 22:50 mrpod2g 阅读(162) 评论(0) 推荐(0)
摘要:一、Min-max标准化min-max标准化方法是对原始数据进行线性变换。设minA和maxA分别为属性A的最小值和最大值,将A的一个原始值x通过min-max标准化映射成在区间[0,1]中的值x',其公式为:新数据=(原数据-极小值)/(极大值-极小值)。二、z-score标准化这种方法基于原始数... 阅读全文
posted @ 2015-01-10 14:49 mrpod2g 阅读(392) 评论(0) 推荐(0)
摘要:Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume that the ... 阅读全文
posted @ 2015-01-07 23:50 mrpod2g 阅读(147) 评论(0) 推荐(0)