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=567 lang=golang * * [567] 字符串的排列 * * https://leetcode.cn/problems/permutation-in-string/description/ * * algorithms * Medium (44.10%) * Likes: 735 * Dislikes: 0 * Total Accepted: 211.1K * Total Submissions: 478.6K * Testcase Example: '"ab"\n"eidbaooo"' * * 给你两个字符串 s1 和 s2 ,写一个函数来判断 s2 是否包含 s1 的排列。如果是,返回 true ;否则,返回 false 。 * * 换句话说,s1 的排列之一是 s2 的 子串 。 * * * * 示例 1: * * * 输入:s1 = "ab" s2 = "eidbaooo" * 输出:true * 解释:s2 包含 s1 的排列之一 ("ba"). * * * 示例 2: * * * 输入:s1= "ab" s2 = "eidboaoo" * 输出:false * * * * * 提示: * * * 1 <= s1.length, s2.length <= 10^4 * s1 和 s2 仅包含小写字母 * *

Jump to

Keyboard shortcuts

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