题目描述: 给定一个字符串 s,找到 s 中最长的回文子串。你可以假设 s 的最大长度为 1000。 示例 1: 输入: “babad” 输出: “bab” 注意: …
分类:LeetCode
322. 零钱兑换
class Solution(object): def coinChange(self, coins, amount): """ :type coins: List[int] :type amount: int :rty…
Leetcode 142.Linked List Cycle II
Given a linked list, return the node where the cycle begins. If there is no cycle, return null. Note: Do not m…
[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 | Symmetric Tree(镜像树)
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, th…
[LintCode] Number of Airplanes in the Sky
Problem Given an interval list which are flying and landing time of the flight. How many airplanes are on the …
LeetCode算法题-Shortest Unsorted Continuous Subarray(Java实现)
这是悦乐书的第267次更新,第281篇原创 01 看题和准备 今天介绍的是LeetCode算法题中Easy级别的第134题(顺位题号是581)。给定一个整数数组,找到一个连续的子数组,按升序对该子数组进行排序,使得整个数…
Day18. Number of Segments in a String(434)
问题描述: Count the number of segments in a string, where a segment is defined to be a contiguous sequence of non-…
[LeetCode By Go 43]387. First Unique Character in a String
题目 Given a string, find the first non-repeating character in it and return it’s index. If it doesn’…