Leetcode
Dxigui_
这个作者很懒,什么都没留下…
展开
-
Leetcode 867 Transpose Matrix
867. Transpose Matrix Given a matrix A, return the transpose of A. The transpose of a matrix is the matrix flipped over it’s main diagonal, switching the row and column indices of the matrix. Examp...原创 2018-08-28 19:37:20 · 136 阅读 · 0 评论 -
Leetcode 881 救生艇
第 i 个人的体重为 people[i],每艘船可以承载的最大重量为 limit。 每艘船最多可同时载两人,但条件是这些人的重量之和最多为 limit。 返回载到每一个人所需的最小船数。(保证每个人都能被船载)。 示例 1: 输入:people = [1,2], limit = 3 输出:1 解释:1 艘船载 (1, 2) 示例 2: 输入:people = [3,2,2,1]...原创 2018-08-28 19:51:21 · 933 阅读 · 0 评论 -
Leetcode 806.Number of Lines To Write String
806.Number of Lines To Write String We are to write the letters of a given string S, from left to right into lines. Each line has maximum width 100 units, and if writing a letter would cause the widt...原创 2018-09-03 20:21:41 · 139 阅读 · 0 评论 -
Leetcode 747.Largest Number At Least Twice of Others
747. Largest Number At Least Twice of Others In a given integer array nums, there is always exactly one largest element. Find whether the largest element in the array is at least twice as much as ev...原创 2018-09-03 20:23:08 · 189 阅读 · 0 评论 -
Leetcode 561.Array Partition I
561. Array Partition I Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), …, (an, bn) which makes sum of min(ai, bi) for all i from 1...原创 2018-09-03 20:30:20 · 191 阅读 · 0 评论