Given a string S and a string T, count the number of distinct subsequences of T&nbs…
分类:LeetCode题目解答
力扣(LeetCode)448
题目地址:https://leetcode-cn.com/probl…题目描述:给定一个范围在 1 ≤ a[i] ≤ n ( n = 数组大小 ) 的 整型数组,数组中的元素一些出现了两次,另一些只出现一次。…
[LeetCode] Flood Fill 洪水填充
An image is represented by a 2-D array of integers, each integer representing the pixel value…
LeetCode | Longest Palindromic Substring
题目: Given a string S , find the longest palindromic substring in S . You may assume that the maxim…
LeetCode 034 Search for a Range
题目描述 Given a sorted array of integers, find the starting and ending position of a given target value. Your alg…
[Leetcode] Binary Tree Longest Consecutive Sequence 二叉搜索树最长序列
Binary Tree Longest Consecutive Sequence Given a binary tree, find the length of the longest consecutive seque…
[LeetCode] Missing Number 丢失的数字,Single Number II 单独的数字之二,Single Number III 单独的数字之三,5.7 Find Missing Integer 查找丢失的数
Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing f…
[LeetCode] Convert a Number to Hexadecimal 数字转为十六进制
Given an integer, write an algorithm to convert it to hexadecimal. For negative integer, two’s com…
LeetCode | Merge Sorted Array
题目: Given two sorted integer arrays A and B, merge B into A as one sorted array. Note: You may assume that A h…
[Leetcode] Contains Duplicate 包含重复
Contains Duplicate I Given an array of integers, find if the array contains any duplicates. Your function shou…
[LeetCode] Design Snake Game 设计贪吃蛇游戏
Design a Snake game that is played on a device with screen size = width x height. Play the game online …
[LeetCode] Binary Tree Vertical Order Traversal 二叉树的竖直遍历
Given a binary tree, return the vertical order traversal of its nodes’ values. (ie, from top to b…