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

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

Count PrimesCount the number of prime numbers less than a non-negative number, n.    [#204]Example: Input: 10 Output: 4 Explanation: There are 4 prime numbers less than 10, they are 2, 3, 5....

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

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

Number of IslandsGiven a 2d grid map of '1' s (land) and '0' s (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertic....

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

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

House RobberYou are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that a....

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

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

Reverse BitsReverse bits of a given 32 bits unsigned integer.     [#190]    Example 1:    Input: 00000010100101000001111010011100    Output: 001110010111100000....

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

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

Factorial Trailing ZeroesGiven an integer n, return the number of trailing zeroes in n!.    [#172] Examples: Input: 3 Output: 0 Explanation: 3! = 6, no trailing zero. Inp...

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

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

Majority ElementGiven an array of size n, find the majority element. The majority element is the element that appears more than [n/2] times.You may assume that the array is non-empty and the majority....

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

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

Excel Sheet Column TitleGiven a positive integer, return its corresponding column title as appear in an Excel sheet.    [#168]For example: 1 -> A 2 -> B 3 -> C ... 26 -> Z 27 -&a...

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

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

Find Peak ElementA peak element is an element that is greater than its neighbors.Given an input array nums , where nums[i] ≠ nums[i+1] , find a peak element and return its index.The array may contain....

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

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

Min StackDesign a stack that supports push, pop, top, and retrieving the minimum element in constant time.   [#155]push(x) -- Push element x onto stack.pop() -- Removes the element on top of the....

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

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

Find Minimum in Rotated Sorted ArraySuppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.    [#153](i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,....

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

算法编程

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

+关注