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

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

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

Reverse Words in a StringGiven an input string, reverse the string word by word.    [#151]Examples: Input: "the sky is blue" Output: "blue is sky the" Input: " hello world! " Output: "world....

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

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

Single NumberGiven a non-empty array of integers, every element appears twice except for one. Find that single one.    [#136]Note:Your algorithm should have a linear runtime complexity. Cou....

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

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

Palindrome PartitioningGiven a string s, partition s such that every substring of the partition is a palindrome.Return all possible palindrome partitioning of s.   [#131]Example: Input: "aab" Ou....

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

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

Word LadderGiven two words (beginWord and endWord), and a dictionary's word list, find the length of shortest transformation sequence from beginWord to endWord, such that:1. Only one letter can be ch....

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

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

Valid PalindromeGiven a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.   [#125]Example: "A man, a plan, a canal: Panama" is a palindrome. "....

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

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

Best Time to Buy and Sell StockSay you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transaction (i.e., buy one and....

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

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

Decode WaysA message containing letters from A-Z is being encoded to numbers using the following mapping:'A' -> 1 'B' -> 2 ... 'Z' -> 26Given a non-empty string containing only digits, deter....

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

产品推荐

Python学习站

Python学习资料大全,包含Python编程学习、实战案例分享、开发者必知词条等内容。

+关注
相关镜像
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等