随笔分类 - leetcode-midium
摘要:题面 Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives th
阅读全文
摘要:11. Container With Most Water 题面 Given n non-negative integers a1, a2, ..., an , where each represents a point at coordinate (i, ai). n vertical lines
阅读全文
摘要:5. Longest Palindromic Substring 题面 Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000
阅读全文
摘要:3. Longest Substring Without Repeating Characters 题面 Given a string, find the length of the longest substring without repeating characters. 给定字符串,找到最长
阅读全文
摘要:leetcode-48.旋转图像 point: 数组 题意 给定一个 n × n 的二维矩阵表示一个图像。 将图像顺时针旋转 90 度。 说明: 你必须在原地旋转图像,这意味着你需要直接修改输入的二维矩阵。请不要使用另一个矩阵来旋转图像。 示例 1: 示例 2: 算法1 简单点就是,用一个栈来按照顺
阅读全文
摘要:leetcode-978. 最长湍流子数组 Points 题意 当 A 的子数组 A[i], A[i+1], ..., A[j] 满足下列条件时,我们称其为湍流子数组: 若 i <= k < j,当 k 为奇数时, A[k] > A[k+1],且当 k 为偶数时,A[k] < A[k+1]; 或 若
阅读全文

浙公网安备 33010602011771号