jzoffer

package
v0.0.0-...-6c0d317 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

* @lc app=leetcode.cn id=525 lang=golang * * [525] 连续数组 * * https://leetcode.cn/problems/contiguous-array/description/ * * algorithms * Medium (54.47%) * Likes: 573 * Dislikes: 0 * Total Accepted: 58.7K * Total Submissions: 107.7K * Testcase Example: '[0,1]' * * 给定一个二进制数组 nums , 找到含有相同数量的 0 和 1 的最长连续子数组,并返回该子数组的长度。 * * * * 示例 1: * * * 输入: nums = [0,1] * 输出: 2 * 说明: [0, 1] 是具有相同数量 0 和 1 的最长连续子数组。 * * 示例 2: * * * 输入: nums = [0,1,0] * 输出: 2 * 说明: [0, 1] (或 [1, 0]) 是具有相同数量0和1的最长连续子数组。 * * * * 提示: * * * 1 * nums[i] 不是 0 就是 1 * *

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL