文章 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....

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

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

Rotate ImageYou are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise).     [#48]Note:You have to rotate the image in-place, which means you have to m....

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

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

PermutationsGiven a collection of distinct integers, return all possible permutations.    [#46]Example: Input: [1,2,3] Output: [ [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], [3,2,1] ]题意:给定一....

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

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

First Missing PositiveGiven an unsorted integer array, find the smallest missing positive integer.    [#41]Example: Input: [1,2,0] Output: 3 Input: [3,4,-1,1] Output: 2 Input: [7,8,9,11,12]....

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

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

Combination SumGiven a set of candidate numbers ( candidates ) (without duplicates) and a target number ( target ), find all unique combinations in candidates where the candidate numbers sums to targ....

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

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

Valid SudokuDetermine if a 9x9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules:   [#36]1. Each row must contain the digits 1-9 without repetiti....

Python 刷Leetcode题库,顺带学英语单词(9)
文章 2023-05-22 来自:开发者社区

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

Find First and Last Position of Element in SortedGiven an array of integers nums sorted in ascending order, find the starting and ending position of a given target value.  [#34]Your algorithm's ....

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

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

Remove ElementGiven an array nums and a value val, remove all instances of that value in-place and return the new length.Do not allocate extra space for another array, you must do this by modifying t....

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

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

Remove Duplicates from Sorted ArrayGiven a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length.Do not allocate extra space for another ....

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

算法编程

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

+关注