# 归档 2017年2月5日

## LeetCode Weekly Contest 18b解题报告 作者是 在线疯狂 发布于 2017年2月5日 在 LeetCode.

LeetCode Weekly Contest 18b是LeetCode举办的第二十三场正式周赛，共4道题目，比赛时长1.5小时。

LeetCode 496. Next Greater Element I

LeetCode 506. Relative Ranks

LeetCode 503. Next Greater Element II

LeetCode 498. Diagonal Traverse

## 题目描述：

LeetCode 498. Diagonal Traverse

Given a matrix of M x N elements (M rows, N columns), return all elements of the matrix in diagonal order.

Example 1:

Input:
[
[ 1, 2, 3 ],
[ 4, 5, 6 ],
[ 7, 8, 9 ]
]
Output:  [1 ...

## 题目描述：

LeetCode 503. Next Greater Element II

Given a circular array (the next element of the last element is the first element of the array), print the Next Greater Number for every element. The Next Greater Number of a number ...

## 题目描述：

LeetCode 506. Relative Ranks

Given scores of N athletes, find their relative ranks and the men with the top three highest scores, who will be awarded medals: "Gold Medal", "Silver Medal" and "Bronze Medal".

Example 1:

Input: [5, 4 ...

## 题目描述：

LeetCode 496. Next Greater Element I

You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all the next greater numbers for nums1's elements in the corresponding places of ...