1. 题目 Given a string containing just the characters ‘(‘ and ‘)’, find the length of th…
分类:LeetCode
Leetcode. 数组中子数组的最大累乘积
问题 给定一个double类型的数组arr, 其中的元素可正, 可负, 可0, 返回子数组累乘的最大乘积. 例如, arr = [-2.5, 4, 0, 3, 0.5, 8, -1], 子数组{3, 0.5, 8}累乘可…
345. Reverse Vowels of a String
Write a function that takes a string as input and reverse only the vowels of a string. Example 1: Given s = …
91. Decode Ways
91. Decode Ways 题目 A message containing letters from A-Z is being encoded to numbers using the following mappi…
[LeetCode] Design Hit Counter 设计点击计数器
Design a hit counter which counts the number of hits received in the past 5 minutes. Each function acce…
LeetCode | Multiply Strings(字符串相乘)
Given two numbers represented as strings, return multiplication of the numbers as a string. Note: The numbers …
每日一道LeetCode 1:Array篇--Remove Duplicate From Sorted Array
问题: Given a sorted array, remove the duplicates in-place such that each element appear only once and return th…
【LeetCode】- First Bad Version
1、题目描述 You are a product manager and currently leading a team to develop a new product. Unfortunately, the lat…
LeetCode刷题之Next Permutation
Problem Implement next permutation, which rearranges numbers into the lexicographically next greater permutati…
122. Best Time to Buy and Sell Stock II
欢迎fork and star:Nowcoder-Repository-github 122. Best Time to Buy and Sell Stock II 题目 Say you have an array fo…
[LeetCode] Graph Valid Tree 图验证树
Given n nodes labeled from 0 to n - 1 and a list of undirected edges (eac…
[LeetCode] Complex Number Multiplication 复数相乘
Given two strings representing two complex numbers. You need to return a string representing their mult…