上一页 1 2 3 4 5 6 7 ··· 15 下一页
摘要: All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying DNA, it is sometimes useful to ... 阅读全文
posted @ 2015-03-15 15:26 A_zhu 阅读(655) 评论(1) 推荐(0) 编辑
摘要: Given a list of non negative integers, arrange them such that they form the largest number.For example, given[3, 30, 34, 5, 9], the largest formed num... 阅读全文
posted @ 2015-03-13 19:05 A_zhu 阅读(202) 评论(0) 推荐(0) 编辑
摘要: Given an array where elements are sorted in ascending order, convert it to a height balanced BST.Hide TagsTreeDepth-first Search 实现方法有两种,一种是二叉树自下往上 实... 阅读全文
posted @ 2015-03-13 17:38 A_zhu 阅读(160) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate each next pointe... 阅读全文
posted @ 2015-03-13 13:04 A_zhu 阅读(196) 评论(0) 推荐(0) 编辑
摘要: Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.Callingnext()will return the next... 阅读全文
posted @ 2015-03-13 12:47 A_zhu 阅读(172) 评论(0) 推荐(0) 编辑
摘要: Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete a... 阅读全文
posted @ 2015-03-12 19:35 A_zhu 阅读(214) 评论(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-03-12 17:40 A_zhu 阅读(607) 评论(0) 推荐(0) 编辑
摘要: Given an arraySofnintegers, find three integers inSsuch that the sum is closest to a given number, target. Return the sum of the three integers. You m... 阅读全文
posted @ 2015-03-12 17:07 A_zhu 阅读(192) 评论(0) 推荐(0) 编辑
摘要: There areNgas stations along a circular route, where the amount of gas at stationiisgas[i].You have a car with an unlimited gas tank and it costscost[... 阅读全文
posted @ 2015-03-12 16:31 A_zhu 阅读(362) 评论(0) 推荐(0) 编辑
摘要: Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as theHamming weight).For example, the 32-bit in... 阅读全文
posted @ 2015-03-10 17:55 A_zhu 阅读(1689) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 15 下一页