Medium FB tag naive方法:O(n2) class Solution { public boolean checkSubarraySum(int[] nums, int k) { if (nums == …
分类:LeetCode
[Leetcode]20. 有效的括号
题目描述: 给定一个只包括 ‘(‘,’)’,'{‘,’}’,'[‘,’]’ 的字符串,判断字符串是否…
674. 最长连续递增序列
伪装成LIS的简单题目 class Solution(object): def findLengthOfLCIS(self, nums): """ :type nums: List[int] :rtype: int ""…
Day10. Perfect Number(507)
问题描述 We define the Perfect Number is a positive integer that is equal to the sum of all its positive divisors …
[LeetCode By Go 1]461. Hamming Distance
题目描述 https://leetcode.com/problems/hamming-distance/description/ The Hamming distance between two integers is …
[LeetCode] Add Binary 二进制数相加
Given two binary strings, return their sum (also a binary string). For example,a = "11"b = "1"Return…
LeetCode 092 Reverse Linked List II
题目描述 Reverse a linked list from position m to n. Do it in-place and in one-pass. For example: Given 1->2-&g…
Leetcode94——Binary Tree Inorder Traversal
文章作者:Tyan 博客:noahsnail.com | CSDN | 简书 1. 问题描述 Given a binary tree, return the inorder…
无重复字符的最长子串
无重复字符的最长子串 给定一个字符串,找出不含有重复字符的最长子串的长度。 输入: "abcabcbb" 输出: 3 解释: 无重复字符的最长子串是 "abc",其长度为 3。 输入: "bbbbb" 输出: 1 解释:…
129. Sum Root to Leaf Numbers
欢迎fork and star:Nowcoder-Repository-github 129. Sum Root to Leaf Numbers 题目 Given a binary tree containing dig…
[LeetCode] Single Number III 单独的数字之三,Single Number II
Given an array of numbers nums, in which exactly two elements appear only once and all the other e…
[LeetCode] Longest Palindrome 最长回文串
Given a string which consists of lowercase or uppercase letters, find the length of the longest palindr…