package
0.0.0-20241220224003-b7cf03a90b2b
Repository: https://github.com/szhou12/leetcode-go.git
Documentation: pkg.go.dev

# README

567. Permutation in String

Solution idea

Sliding Window

  • 整体code框架与 438. Find All Anagrams in a String 完全一致
  • 不同的地方在于: 此题找到一个合法的就可以返回,不用都找到
  • 因为 sliding window 是定长, 写法也可以是单指针

Time complexity = $O(n)$

Resource

滑动窗口算法 wisdompeak/LeetCode