摘要: 题目Single Number通过率45.1%难度Medium Given an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should ... 阅读全文
posted @ 2015-07-06 20:18 pku_min 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 题目Merge Sorted Array通过率30.7%难度EasyGiven two sorted integer arrays A and B, merge B into A as one sorted array.Note:You may assume that A has enough sp... 阅读全文
posted @ 2015-01-19 19:52 pku_min 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 题目Merge Two Sorted Lists通过率33.2%难度EasyMerge two sorted linked lists and return it as a new list. The new list should be made by splicing together the ... 阅读全文
posted @ 2015-01-14 11:21 pku_min 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 题目Majority Element通过率33.8%难度EasyGiven an array of sizen, find the majority element. The majority element is the element that appears more than⌊ n/2 ⌋t... 阅读全文
posted @ 2015-01-13 22:19 pku_min 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 题目Excel Sheet Column Title通过率17.2%难度EasyGiven a positive integer, return its corresponding column title as appear in an Excel sheet.For example: 1 ... 阅读全文
posted @ 2015-01-11 17:19 pku_min 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 题目Excel Sheet Column Number通过率40.5%难度EasyRelated to questionExcel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its corre... 阅读全文
posted @ 2015-01-11 16:16 pku_min 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 题目Pascal's Triangle II通过率29.8%难度EasyGiven an indexk, return thekthrow of the Pascal's triangle.For example, givenk= 3,Return[1,3,3,1].Note:Could you o... 阅读全文
posted @ 2015-01-10 10:53 pku_min 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 题目Pascal's Triangle通过率30.7%难度EasyGivennumRows, generate the firstnumRowsof Pascal's triangle.For example, givennumRows= 5,Return[ [1], [1,1], ... 阅读全文
posted @ 2015-01-10 10:24 pku_min 阅读(192) 评论(0) 推荐(0) 编辑
摘要: You are climbing a stair case. It takesnsteps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb... 阅读全文
posted @ 2015-01-08 11:04 pku_min 阅读(113) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth... 阅读全文
posted @ 2015-01-08 10:44 pku_min 阅读(121) 评论(0) 推荐(0) 编辑