leetcode1329

package
v0.0.0-...-a94f1ba Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2024 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Overview

* @lc app=leetcode id=1329 lang=golang * * [1329] Sort the Matrix Diagonally * * https://leetcode.com/problems/sort-the-matrix-diagonally/description/ * * algorithms * Medium (78.01%) * Likes: 95 * Dislikes: 34 * Total Accepted: 5.8K * Total Submissions: 7.4K * Testcase Example: '[[3,3,1,1],[2,2,1,2],[1,1,1,2]]' * * Given a m * n matrix mat of integers, sort it diagonally in ascending order * from the top-left to the bottom-right then return the sorted array. * * * Example 1: * * * Input: mat = [[3,3,1,1],[2,2,1,2],[1,1,1,2]] * Output: [[1,1,1,1],[1,2,2,2],[1,2,3,3]] * * * * Constraints: * * * m == mat.length * n == mat[i].length * 1 <= m, n <= 100 * 1 <= mat[i][j] <= 100 *

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL