文章 2023-05-22 来自:开发者社区

Python 刷Leetcode题库,顺带学英语单词(23)

Sort ColorsGiven an array with n objects colored red, white or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the order red, white and blue.   [#75]H....

文章 2023-05-22 来自:开发者社区

Python 刷Leetcode题库,顺带学英语单词(22)

Search a 2D MatrixWrite an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:Integers in each row are sorted from left to right.The first inte....

文章 2023-05-22 来自:开发者社区

Python 刷Leetcode题库,顺带学英语单词(21)

Climbing StairsYou are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?   [#70]Note: G....

文章 2023-05-22 来自:开发者社区

Python 刷Leetcode题库,顺带学英语单词(20)

Add BinaryGiven two binary strings, return their sum (also a binary string).      [#67]The input strings are both non-empty and contains only characters 1 or 0 .Examples: Input: a = "1....

文章 2023-05-22 来自:开发者社区

Python 刷Leetcode题库,顺带学英语单词(19)

Minimum Path SumGiven a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.    [#64]Note: You can o....

文章 2023-05-22 来自:开发者社区

Python 刷Leetcode题库,顺带学英语单词(18)

Permutation Sequence The set [1,2,3,...,*n*] contains a total of n! unique permutations.   [#60]By listing and labeling all of the permutations in order, we get the following sequence for n = 3:....

文章 2023-05-22 来自:开发者社区

Python 刷Leetcode题库,顺带学英语单词(17)

Spiral MatrixGiven a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.   [#54] Example 1: Input: [ [ 1, 2, 3 ], [ 4, 5, 6 ], ...

文章 2023-05-22 来自:开发者社区

Python 刷Leetcode题库,顺带学英语单词(16)

Merge IntervalsGiven a collection of intervals, merge all overlapping intervals.    [#56] Example 1: Input: [[1,3],[2,6],[8,10],[15,18]] Output: [[1,6],[8,10],[15,18]] Explan...

文章 2023-05-22 来自:开发者社区

Python 刷Leetcode题库,顺带学英语单词(15)

Maximum SubarrayGiven an integer array nums , find the contiguous subarray (containing at least one number) which has the largest sum and return its sum.   [#53]Example: Input: [-2,1,-3,4,-1,2,1....

文章 2023-05-22 来自:开发者社区

Python 刷Leetcode题库,顺带学英语单词(14)

N-QueensThe n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other.    [#51]Given an integer n, return all distinct solutions to t....

本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。

算法编程

开发者社区在线编程频道官方技术圈。包含算法资源更新,周赛动态,每日一题互动。

+关注