
leetcode题解
文章平均质量分 75
shia金
但行好事,莫问前程。
展开
-
LeetCode26:Median of Two Sorted Arrays
【题目】 There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)). 【分析】 这个题目按照一般的思路,是先将两个数组归并原创 2015-01-31 16:28:24 · 324 阅读 · 0 评论 -
LeetCode179:Largest Number
【题目】 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 number is 9534330. Note: The result m原创 2015-01-30 20:25:26 · 436 阅读 · 0 评论 -
LeetCode174:Dungeon Game
【题目】 The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of M x N rooms laid out in a 2D grid. Our valiant knight (K) was原创 2015-01-30 20:50:15 · 345 阅读 · 0 评论