From a2061af207bbdcdab771a07eef50ce9f10a824e1 Mon Sep 17 00:00:00 2001 From: 0xff-dev Date: Tue, 8 Apr 2025 09:16:45 +0800 Subject: [PATCH] add 3301-3400 problems --- cmd/main.go | 1 + .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../3312.Sorted-GCD-Pair-Queries/README.md | 32 +++++++++++++++ .../3312.Sorted-GCD-Pair-Queries/Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../3340.Check-Balanced-String/README.md | 32 +++++++++++++++ .../3340.Check-Balanced-String/Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../3351.Sum-of-Good-Subsequences/README.md | 32 +++++++++++++++ .../3351.Sum-of-Good-Subsequences/Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../3360.Stone-Removal-Game/README.md | 32 +++++++++++++++ .../3360.Stone-Removal-Game/Solution.go | 5 +++ .../3360.Stone-Removal-Game/Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../3366.Minimum-Array-Sum/README.md | 32 +++++++++++++++ .../3366.Minimum-Array-Sum/Solution.go | 5 +++ .../3366.Minimum-Array-Sum/Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../3379.Transformed-Array/README.md | 32 +++++++++++++++ .../3379.Transformed-Array/Solution.go | 5 +++ .../3379.Transformed-Array/Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ 238 files changed, 6005 insertions(+) create mode 100755 leetcode/3301-3400/3301.Maximize-the-Total-Height-of-Unique-Towers/README.md create mode 100644 leetcode/3301-3400/3301.Maximize-the-Total-Height-of-Unique-Towers/Solution.go create mode 100644 leetcode/3301-3400/3301.Maximize-the-Total-Height-of-Unique-Towers/Solution_test.go create mode 100755 leetcode/3301-3400/3302.Find-the-Lexicographically-Smallest-Valid-Sequence/README.md create mode 100644 leetcode/3301-3400/3302.Find-the-Lexicographically-Smallest-Valid-Sequence/Solution.go create mode 100644 leetcode/3301-3400/3302.Find-the-Lexicographically-Smallest-Valid-Sequence/Solution_test.go create mode 100755 leetcode/3301-3400/3303.Find-the-Occurrence-of-First-Almost-Equal-Substring/README.md create mode 100644 leetcode/3301-3400/3303.Find-the-Occurrence-of-First-Almost-Equal-Substring/Solution.go create mode 100644 leetcode/3301-3400/3303.Find-the-Occurrence-of-First-Almost-Equal-Substring/Solution_test.go create mode 100755 leetcode/3301-3400/3304.Find-the-K-th-Character-in-String-Game-I/README.md create mode 100644 leetcode/3301-3400/3304.Find-the-K-th-Character-in-String-Game-I/Solution.go create mode 100644 leetcode/3301-3400/3304.Find-the-K-th-Character-in-String-Game-I/Solution_test.go create mode 100755 leetcode/3301-3400/3305.Count-of-Substrings-Containing-Every-Vowel-and-K-Consonants-I/README.md create mode 100644 leetcode/3301-3400/3305.Count-of-Substrings-Containing-Every-Vowel-and-K-Consonants-I/Solution.go create mode 100644 leetcode/3301-3400/3305.Count-of-Substrings-Containing-Every-Vowel-and-K-Consonants-I/Solution_test.go create mode 100755 leetcode/3301-3400/3306.Count-of-Substrings-Containing-Every-Vowel-and-K-Consonants-II/README.md create mode 100644 leetcode/3301-3400/3306.Count-of-Substrings-Containing-Every-Vowel-and-K-Consonants-II/Solution.go create mode 100644 leetcode/3301-3400/3306.Count-of-Substrings-Containing-Every-Vowel-and-K-Consonants-II/Solution_test.go create mode 100755 leetcode/3301-3400/3307.Find-the-K-th-Character-in-String-Game-II/README.md create mode 100644 leetcode/3301-3400/3307.Find-the-K-th-Character-in-String-Game-II/Solution.go create mode 100644 leetcode/3301-3400/3307.Find-the-K-th-Character-in-String-Game-II/Solution_test.go create mode 100755 leetcode/3301-3400/3309.Maximum-Possible-Number-by-Binary-Concatenation/README.md create mode 100644 leetcode/3301-3400/3309.Maximum-Possible-Number-by-Binary-Concatenation/Solution.go create mode 100644 leetcode/3301-3400/3309.Maximum-Possible-Number-by-Binary-Concatenation/Solution_test.go create mode 100755 leetcode/3301-3400/3310.Remove-Methods-From-Project/README.md create mode 100644 leetcode/3301-3400/3310.Remove-Methods-From-Project/Solution.go create mode 100644 leetcode/3301-3400/3310.Remove-Methods-From-Project/Solution_test.go create mode 100755 leetcode/3301-3400/3311.Construct-2D-Grid-Matching-Graph-Layout/README.md create mode 100644 leetcode/3301-3400/3311.Construct-2D-Grid-Matching-Graph-Layout/Solution.go create mode 100644 leetcode/3301-3400/3311.Construct-2D-Grid-Matching-Graph-Layout/Solution_test.go create mode 100755 leetcode/3301-3400/3312.Sorted-GCD-Pair-Queries/README.md create mode 100644 leetcode/3301-3400/3312.Sorted-GCD-Pair-Queries/Solution.go create mode 100644 leetcode/3301-3400/3312.Sorted-GCD-Pair-Queries/Solution_test.go create mode 100755 leetcode/3301-3400/3314.Construct-the-Minimum-Bitwise-Array-I/README.md create mode 100644 leetcode/3301-3400/3314.Construct-the-Minimum-Bitwise-Array-I/Solution.go create mode 100644 leetcode/3301-3400/3314.Construct-the-Minimum-Bitwise-Array-I/Solution_test.go create mode 100755 leetcode/3301-3400/3315.Construct-the-Minimum-Bitwise-Array-II/README.md create mode 100644 leetcode/3301-3400/3315.Construct-the-Minimum-Bitwise-Array-II/Solution.go create mode 100644 leetcode/3301-3400/3315.Construct-the-Minimum-Bitwise-Array-II/Solution_test.go create mode 100755 leetcode/3301-3400/3316.Find-Maximum-Removals-From-Source-String/README.md create mode 100644 leetcode/3301-3400/3316.Find-Maximum-Removals-From-Source-String/Solution.go create mode 100644 leetcode/3301-3400/3316.Find-Maximum-Removals-From-Source-String/Solution_test.go create mode 100755 leetcode/3301-3400/3317.Find-the-Number-of-Possible-Ways-for-an-Event/README.md create mode 100644 leetcode/3301-3400/3317.Find-the-Number-of-Possible-Ways-for-an-Event/Solution.go create mode 100644 leetcode/3301-3400/3317.Find-the-Number-of-Possible-Ways-for-an-Event/Solution_test.go create mode 100755 leetcode/3301-3400/3318.Find-X-Sum-of-All-K-Long-Subarrays-I/README.md create mode 100644 leetcode/3301-3400/3318.Find-X-Sum-of-All-K-Long-Subarrays-I/Solution.go create mode 100644 leetcode/3301-3400/3318.Find-X-Sum-of-All-K-Long-Subarrays-I/Solution_test.go create mode 100755 leetcode/3301-3400/3319.K-th-Largest-Perfect-Subtree-Size-in-Binary-Tree/README.md create mode 100644 leetcode/3301-3400/3319.K-th-Largest-Perfect-Subtree-Size-in-Binary-Tree/Solution.go create mode 100644 leetcode/3301-3400/3319.K-th-Largest-Perfect-Subtree-Size-in-Binary-Tree/Solution_test.go create mode 100755 leetcode/3301-3400/3320.Count-The-Number-of-Winning-Sequences/README.md create mode 100644 leetcode/3301-3400/3320.Count-The-Number-of-Winning-Sequences/Solution.go create mode 100644 leetcode/3301-3400/3320.Count-The-Number-of-Winning-Sequences/Solution_test.go create mode 100755 leetcode/3301-3400/3321.Find-X-Sum-of-All-K-Long-Subarrays-II/README.md create mode 100644 leetcode/3301-3400/3321.Find-X-Sum-of-All-K-Long-Subarrays-II/Solution.go create mode 100644 leetcode/3301-3400/3321.Find-X-Sum-of-All-K-Long-Subarrays-II/Solution_test.go create mode 100755 leetcode/3301-3400/3324.Find-the-Sequence-of-Strings-Appeared-on-the-Screen/README.md create mode 100644 leetcode/3301-3400/3324.Find-the-Sequence-of-Strings-Appeared-on-the-Screen/Solution.go create mode 100644 leetcode/3301-3400/3324.Find-the-Sequence-of-Strings-Appeared-on-the-Screen/Solution_test.go create mode 100755 leetcode/3301-3400/3325.Count-Substrings-With-K-Frequency-Characters-I/README.md create mode 100644 leetcode/3301-3400/3325.Count-Substrings-With-K-Frequency-Characters-I/Solution.go create mode 100644 leetcode/3301-3400/3325.Count-Substrings-With-K-Frequency-Characters-I/Solution_test.go create mode 100755 leetcode/3301-3400/3326.Minimum-Division-Operations-to-Make-Array-Non-Decreasing/README.md create mode 100644 leetcode/3301-3400/3326.Minimum-Division-Operations-to-Make-Array-Non-Decreasing/Solution.go create mode 100644 leetcode/3301-3400/3326.Minimum-Division-Operations-to-Make-Array-Non-Decreasing/Solution_test.go create mode 100755 leetcode/3301-3400/3327.Check-if-DFS-Strings-Are-Palindromes/README.md create mode 100644 leetcode/3301-3400/3327.Check-if-DFS-Strings-Are-Palindromes/Solution.go create mode 100644 leetcode/3301-3400/3327.Check-if-DFS-Strings-Are-Palindromes/Solution_test.go create mode 100755 leetcode/3301-3400/3330.Find-the-Original-Typed-String-I/README.md create mode 100644 leetcode/3301-3400/3330.Find-the-Original-Typed-String-I/Solution.go create mode 100644 leetcode/3301-3400/3330.Find-the-Original-Typed-String-I/Solution_test.go create mode 100755 leetcode/3301-3400/3331.Find-Subtree-Sizes-After-Changes/README.md create mode 100644 leetcode/3301-3400/3331.Find-Subtree-Sizes-After-Changes/Solution.go create mode 100644 leetcode/3301-3400/3331.Find-Subtree-Sizes-After-Changes/Solution_test.go create mode 100755 leetcode/3301-3400/3332.Maximum-Points-Tourist-Can-Earn/README.md create mode 100644 leetcode/3301-3400/3332.Maximum-Points-Tourist-Can-Earn/Solution.go create mode 100644 leetcode/3301-3400/3332.Maximum-Points-Tourist-Can-Earn/Solution_test.go create mode 100755 leetcode/3301-3400/3333.Find-the-Original-Typed-String-II/README.md create mode 100644 leetcode/3301-3400/3333.Find-the-Original-Typed-String-II/Solution.go create mode 100644 leetcode/3301-3400/3333.Find-the-Original-Typed-String-II/Solution_test.go create mode 100755 leetcode/3301-3400/3334.Find-the-Maximum-Factor-Score-of-Array/README.md create mode 100644 leetcode/3301-3400/3334.Find-the-Maximum-Factor-Score-of-Array/Solution.go create mode 100644 leetcode/3301-3400/3334.Find-the-Maximum-Factor-Score-of-Array/Solution_test.go create mode 100755 leetcode/3301-3400/3335.Total-Characters-in-String-After-Transformations-I/README.md create mode 100644 leetcode/3301-3400/3335.Total-Characters-in-String-After-Transformations-I/Solution.go create mode 100644 leetcode/3301-3400/3335.Total-Characters-in-String-After-Transformations-I/Solution_test.go create mode 100755 leetcode/3301-3400/3336.Find-the-Number-of-Subsequences-With-Equal-GCD/README.md create mode 100644 leetcode/3301-3400/3336.Find-the-Number-of-Subsequences-With-Equal-GCD/Solution.go create mode 100644 leetcode/3301-3400/3336.Find-the-Number-of-Subsequences-With-Equal-GCD/Solution_test.go create mode 100755 leetcode/3301-3400/3337.Total-Characters-in-String-After-Transformations-II/README.md create mode 100644 leetcode/3301-3400/3337.Total-Characters-in-String-After-Transformations-II/Solution.go create mode 100644 leetcode/3301-3400/3337.Total-Characters-in-String-After-Transformations-II/Solution_test.go create mode 100755 leetcode/3301-3400/3340.Check-Balanced-String/README.md create mode 100644 leetcode/3301-3400/3340.Check-Balanced-String/Solution.go create mode 100644 leetcode/3301-3400/3340.Check-Balanced-String/Solution_test.go create mode 100755 leetcode/3301-3400/3341.Find-Minimum-Time-to-Reach-Last-Room-I/README.md create mode 100644 leetcode/3301-3400/3341.Find-Minimum-Time-to-Reach-Last-Room-I/Solution.go create mode 100644 leetcode/3301-3400/3341.Find-Minimum-Time-to-Reach-Last-Room-I/Solution_test.go create mode 100755 leetcode/3301-3400/3342.Find-Minimum-Time-to-Reach-Last-Room-II/README.md create mode 100644 leetcode/3301-3400/3342.Find-Minimum-Time-to-Reach-Last-Room-II/Solution.go create mode 100644 leetcode/3301-3400/3342.Find-Minimum-Time-to-Reach-Last-Room-II/Solution_test.go create mode 100755 leetcode/3301-3400/3343.Count-Number-of-Balanced-Permutations/README.md create mode 100644 leetcode/3301-3400/3343.Count-Number-of-Balanced-Permutations/Solution.go create mode 100644 leetcode/3301-3400/3343.Count-Number-of-Balanced-Permutations/Solution_test.go create mode 100755 leetcode/3301-3400/3345.Smallest-Divisible-Digit-Product-I/README.md create mode 100644 leetcode/3301-3400/3345.Smallest-Divisible-Digit-Product-I/Solution.go create mode 100644 leetcode/3301-3400/3345.Smallest-Divisible-Digit-Product-I/Solution_test.go create mode 100755 leetcode/3301-3400/3346.Maximum-Frequency-of-an-Element-After-Performing-Operations-I/README.md create mode 100644 leetcode/3301-3400/3346.Maximum-Frequency-of-an-Element-After-Performing-Operations-I/Solution.go create mode 100644 leetcode/3301-3400/3346.Maximum-Frequency-of-an-Element-After-Performing-Operations-I/Solution_test.go create mode 100755 leetcode/3301-3400/3347.Maximum-Frequency-of-an-Element-After-Performing-Operations-II/README.md create mode 100644 leetcode/3301-3400/3347.Maximum-Frequency-of-an-Element-After-Performing-Operations-II/Solution.go create mode 100644 leetcode/3301-3400/3347.Maximum-Frequency-of-an-Element-After-Performing-Operations-II/Solution_test.go create mode 100755 leetcode/3301-3400/3348.Smallest-Divisible-Digit-Product-II/README.md create mode 100644 leetcode/3301-3400/3348.Smallest-Divisible-Digit-Product-II/Solution.go create mode 100644 leetcode/3301-3400/3348.Smallest-Divisible-Digit-Product-II/Solution_test.go create mode 100755 leetcode/3301-3400/3349.Adjacent-Increasing-Subarrays-Detection-I/README.md create mode 100644 leetcode/3301-3400/3349.Adjacent-Increasing-Subarrays-Detection-I/Solution.go create mode 100644 leetcode/3301-3400/3349.Adjacent-Increasing-Subarrays-Detection-I/Solution_test.go create mode 100755 leetcode/3301-3400/3350.Adjacent-Increasing-Subarrays-Detection-II/README.md create mode 100644 leetcode/3301-3400/3350.Adjacent-Increasing-Subarrays-Detection-II/Solution.go create mode 100644 leetcode/3301-3400/3350.Adjacent-Increasing-Subarrays-Detection-II/Solution_test.go create mode 100755 leetcode/3301-3400/3351.Sum-of-Good-Subsequences/README.md create mode 100644 leetcode/3301-3400/3351.Sum-of-Good-Subsequences/Solution.go create mode 100644 leetcode/3301-3400/3351.Sum-of-Good-Subsequences/Solution_test.go create mode 100755 leetcode/3301-3400/3352.Count-K-Reducible-Numbers-Less-Than-N/README.md create mode 100644 leetcode/3301-3400/3352.Count-K-Reducible-Numbers-Less-Than-N/Solution.go create mode 100644 leetcode/3301-3400/3352.Count-K-Reducible-Numbers-Less-Than-N/Solution_test.go create mode 100755 leetcode/3301-3400/3354.Make-Array-Elements-Equal-to-Zero/README.md create mode 100644 leetcode/3301-3400/3354.Make-Array-Elements-Equal-to-Zero/Solution.go create mode 100644 leetcode/3301-3400/3354.Make-Array-Elements-Equal-to-Zero/Solution_test.go create mode 100755 leetcode/3301-3400/3355.Zero-Array-Transformation-I/README.md create mode 100644 leetcode/3301-3400/3355.Zero-Array-Transformation-I/Solution.go create mode 100644 leetcode/3301-3400/3355.Zero-Array-Transformation-I/Solution_test.go create mode 100755 leetcode/3301-3400/3356.Zero-Array-Transformation-II/README.md create mode 100644 leetcode/3301-3400/3356.Zero-Array-Transformation-II/Solution.go create mode 100644 leetcode/3301-3400/3356.Zero-Array-Transformation-II/Solution_test.go create mode 100755 leetcode/3301-3400/3357.Minimize-the-Maximum-Adjacent-Element-Difference/README.md create mode 100644 leetcode/3301-3400/3357.Minimize-the-Maximum-Adjacent-Element-Difference/Solution.go create mode 100644 leetcode/3301-3400/3357.Minimize-the-Maximum-Adjacent-Element-Difference/Solution_test.go create mode 100755 leetcode/3301-3400/3360.Stone-Removal-Game/README.md create mode 100644 leetcode/3301-3400/3360.Stone-Removal-Game/Solution.go create mode 100644 leetcode/3301-3400/3360.Stone-Removal-Game/Solution_test.go create mode 100755 leetcode/3301-3400/3361.Shift-Distance-Between-Two-Strings/README.md create mode 100644 leetcode/3301-3400/3361.Shift-Distance-Between-Two-Strings/Solution.go create mode 100644 leetcode/3301-3400/3361.Shift-Distance-Between-Two-Strings/Solution_test.go create mode 100755 leetcode/3301-3400/3362.Zero-Array-Transformation-III/README.md create mode 100644 leetcode/3301-3400/3362.Zero-Array-Transformation-III/Solution.go create mode 100644 leetcode/3301-3400/3362.Zero-Array-Transformation-III/Solution_test.go create mode 100755 leetcode/3301-3400/3363.Find-the-Maximum-Number-of-Fruits-Collected/README.md create mode 100644 leetcode/3301-3400/3363.Find-the-Maximum-Number-of-Fruits-Collected/Solution.go create mode 100644 leetcode/3301-3400/3363.Find-the-Maximum-Number-of-Fruits-Collected/Solution_test.go create mode 100755 leetcode/3301-3400/3364.Minimum-Positive-Sum-Subarray-/README.md create mode 100644 leetcode/3301-3400/3364.Minimum-Positive-Sum-Subarray-/Solution.go create mode 100644 leetcode/3301-3400/3364.Minimum-Positive-Sum-Subarray-/Solution_test.go create mode 100755 leetcode/3301-3400/3365.Rearrange-K-Substrings-to-Form-Target-String/README.md create mode 100644 leetcode/3301-3400/3365.Rearrange-K-Substrings-to-Form-Target-String/Solution.go create mode 100644 leetcode/3301-3400/3365.Rearrange-K-Substrings-to-Form-Target-String/Solution_test.go create mode 100755 leetcode/3301-3400/3366.Minimum-Array-Sum/README.md create mode 100644 leetcode/3301-3400/3366.Minimum-Array-Sum/Solution.go create mode 100644 leetcode/3301-3400/3366.Minimum-Array-Sum/Solution_test.go create mode 100755 leetcode/3301-3400/3367.Maximize-Sum-of-Weights-after-Edge-Removals/README.md create mode 100644 leetcode/3301-3400/3367.Maximize-Sum-of-Weights-after-Edge-Removals/Solution.go create mode 100644 leetcode/3301-3400/3367.Maximize-Sum-of-Weights-after-Edge-Removals/Solution_test.go create mode 100755 leetcode/3301-3400/3370.Smallest-Number-With-All-Set-Bits/README.md create mode 100644 leetcode/3301-3400/3370.Smallest-Number-With-All-Set-Bits/Solution.go create mode 100644 leetcode/3301-3400/3370.Smallest-Number-With-All-Set-Bits/Solution_test.go create mode 100755 leetcode/3301-3400/3371.Identify-the-Largest-Outlier-in-an-Array/README.md create mode 100644 leetcode/3301-3400/3371.Identify-the-Largest-Outlier-in-an-Array/Solution.go create mode 100644 leetcode/3301-3400/3371.Identify-the-Largest-Outlier-in-an-Array/Solution_test.go create mode 100755 leetcode/3301-3400/3372.Maximize-the-Number-of-Target-Nodes-After-Connecting-Trees-I/README.md create mode 100644 leetcode/3301-3400/3372.Maximize-the-Number-of-Target-Nodes-After-Connecting-Trees-I/Solution.go create mode 100644 leetcode/3301-3400/3372.Maximize-the-Number-of-Target-Nodes-After-Connecting-Trees-I/Solution_test.go create mode 100755 leetcode/3301-3400/3373.Maximize-the-Number-of-Target-Nodes-After-Connecting-Trees-II/README.md create mode 100644 leetcode/3301-3400/3373.Maximize-the-Number-of-Target-Nodes-After-Connecting-Trees-II/Solution.go create mode 100644 leetcode/3301-3400/3373.Maximize-the-Number-of-Target-Nodes-After-Connecting-Trees-II/Solution_test.go create mode 100755 leetcode/3301-3400/3375.Minimum-Operations-to-Make-Array-Values-Equal-to-K/README.md create mode 100644 leetcode/3301-3400/3375.Minimum-Operations-to-Make-Array-Values-Equal-to-K/Solution.go create mode 100644 leetcode/3301-3400/3375.Minimum-Operations-to-Make-Array-Values-Equal-to-K/Solution_test.go create mode 100755 leetcode/3301-3400/3376.Minimum-Time-to-Break-Locks-I/README.md create mode 100644 leetcode/3301-3400/3376.Minimum-Time-to-Break-Locks-I/Solution.go create mode 100644 leetcode/3301-3400/3376.Minimum-Time-to-Break-Locks-I/Solution_test.go create mode 100755 leetcode/3301-3400/3377.Digit-Operations-to-Make-Two-Integers-Equal/README.md create mode 100644 leetcode/3301-3400/3377.Digit-Operations-to-Make-Two-Integers-Equal/Solution.go create mode 100644 leetcode/3301-3400/3377.Digit-Operations-to-Make-Two-Integers-Equal/Solution_test.go create mode 100755 leetcode/3301-3400/3378.Count-Connected-Components-in-LCM-Graph/README.md create mode 100644 leetcode/3301-3400/3378.Count-Connected-Components-in-LCM-Graph/Solution.go create mode 100644 leetcode/3301-3400/3378.Count-Connected-Components-in-LCM-Graph/Solution_test.go create mode 100755 leetcode/3301-3400/3379.Transformed-Array/README.md create mode 100644 leetcode/3301-3400/3379.Transformed-Array/Solution.go create mode 100644 leetcode/3301-3400/3379.Transformed-Array/Solution_test.go create mode 100755 leetcode/3301-3400/3380.Maximum-Area-Rectangle-With-Point-Constraints-I/README.md create mode 100644 leetcode/3301-3400/3380.Maximum-Area-Rectangle-With-Point-Constraints-I/Solution.go create mode 100644 leetcode/3301-3400/3380.Maximum-Area-Rectangle-With-Point-Constraints-I/Solution_test.go create mode 100755 leetcode/3301-3400/3381.Maximum-Subarray-Sum-With-Length-Divisible-by-K/README.md create mode 100644 leetcode/3301-3400/3381.Maximum-Subarray-Sum-With-Length-Divisible-by-K/Solution.go create mode 100644 leetcode/3301-3400/3381.Maximum-Subarray-Sum-With-Length-Divisible-by-K/Solution_test.go create mode 100755 leetcode/3301-3400/3382.Maximum-Area-Rectangle-With-Point-Constraints-II/README.md create mode 100644 leetcode/3301-3400/3382.Maximum-Area-Rectangle-With-Point-Constraints-II/Solution.go create mode 100644 leetcode/3301-3400/3382.Maximum-Area-Rectangle-With-Point-Constraints-II/Solution_test.go create mode 100755 leetcode/3301-3400/3386.Button-with-Longest-Push-Time/README.md create mode 100644 leetcode/3301-3400/3386.Button-with-Longest-Push-Time/Solution.go create mode 100644 leetcode/3301-3400/3386.Button-with-Longest-Push-Time/Solution_test.go create mode 100755 leetcode/3301-3400/3387.Maximize-Amount-After-Two-Days-of-Conversions/README.md create mode 100644 leetcode/3301-3400/3387.Maximize-Amount-After-Two-Days-of-Conversions/Solution.go create mode 100644 leetcode/3301-3400/3387.Maximize-Amount-After-Two-Days-of-Conversions/Solution_test.go create mode 100755 leetcode/3301-3400/3388.Count-Beautiful-Splits-in-an-Array/README.md create mode 100644 leetcode/3301-3400/3388.Count-Beautiful-Splits-in-an-Array/Solution.go create mode 100644 leetcode/3301-3400/3388.Count-Beautiful-Splits-in-an-Array/Solution_test.go create mode 100755 leetcode/3301-3400/3389.Minimum-Operations-to-Make-Character-Frequencies-Equal/README.md create mode 100644 leetcode/3301-3400/3389.Minimum-Operations-to-Make-Character-Frequencies-Equal/Solution.go create mode 100644 leetcode/3301-3400/3389.Minimum-Operations-to-Make-Character-Frequencies-Equal/Solution_test.go create mode 100755 leetcode/3301-3400/3392.Count-Subarrays-of-Length-Three-With-a-Condition/README.md create mode 100644 leetcode/3301-3400/3392.Count-Subarrays-of-Length-Three-With-a-Condition/Solution.go create mode 100644 leetcode/3301-3400/3392.Count-Subarrays-of-Length-Three-With-a-Condition/Solution_test.go create mode 100755 leetcode/3301-3400/3393.Count-Paths-With-the-Given-XOR-Value/README.md create mode 100644 leetcode/3301-3400/3393.Count-Paths-With-the-Given-XOR-Value/Solution.go create mode 100644 leetcode/3301-3400/3393.Count-Paths-With-the-Given-XOR-Value/Solution_test.go create mode 100755 leetcode/3301-3400/3394.Check-if-Grid-can-be-Cut-into-Sections/README.md create mode 100644 leetcode/3301-3400/3394.Check-if-Grid-can-be-Cut-into-Sections/Solution.go create mode 100644 leetcode/3301-3400/3394.Check-if-Grid-can-be-Cut-into-Sections/Solution_test.go create mode 100755 leetcode/3301-3400/3395.Subsequences-with-a-Unique-Middle-Mode-I/README.md create mode 100644 leetcode/3301-3400/3395.Subsequences-with-a-Unique-Middle-Mode-I/Solution.go create mode 100644 leetcode/3301-3400/3395.Subsequences-with-a-Unique-Middle-Mode-I/Solution_test.go create mode 100755 leetcode/3301-3400/3396.Minimum-Number-of-Operations-to-Make-Elements-in-Array-Distinct/README.md create mode 100644 leetcode/3301-3400/3396.Minimum-Number-of-Operations-to-Make-Elements-in-Array-Distinct/Solution.go create mode 100644 leetcode/3301-3400/3396.Minimum-Number-of-Operations-to-Make-Elements-in-Array-Distinct/Solution_test.go create mode 100755 leetcode/3301-3400/3397.Maximum-Number-of-Distinct-Elements-After-Operations/README.md create mode 100644 leetcode/3301-3400/3397.Maximum-Number-of-Distinct-Elements-After-Operations/Solution.go create mode 100644 leetcode/3301-3400/3397.Maximum-Number-of-Distinct-Elements-After-Operations/Solution_test.go create mode 100755 leetcode/3301-3400/3398.Smallest-Substring-With-Identical-Characters-I/README.md create mode 100644 leetcode/3301-3400/3398.Smallest-Substring-With-Identical-Characters-I/Solution.go create mode 100644 leetcode/3301-3400/3398.Smallest-Substring-With-Identical-Characters-I/Solution_test.go create mode 100755 leetcode/3301-3400/3399.Smallest-Substring-With-Identical-Characters-II/README.md create mode 100644 leetcode/3301-3400/3399.Smallest-Substring-With-Identical-Characters-II/Solution.go create mode 100644 leetcode/3301-3400/3399.Smallest-Substring-With-Identical-Characters-II/Solution_test.go diff --git a/cmd/main.go b/cmd/main.go index 4fbb86a96..7d5835f66 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -35,6 +35,7 @@ func main() { //leetcode.MakeDirFromTo(problems, 2901, 3000) //leetcode.MakeDirFromTo(problems, 3101, 3200) //leetcode.MakeDirFromTo(problems, 3201, 3300) + leetcode.MakeDirFromTo(problems, 3301, 3400) // leetcode.MakeDir(problems) diff --git a/leetcode/3301-3400/3301.Maximize-the-Total-Height-of-Unique-Towers/README.md b/leetcode/3301-3400/3301.Maximize-the-Total-Height-of-Unique-Towers/README.md new file mode 100755 index 000000000..08d28339b --- /dev/null +++ b/leetcode/3301-3400/3301.Maximize-the-Total-Height-of-Unique-Towers/README.md @@ -0,0 +1,32 @@ +# [3301.Maximize the Total Height of Unique Towers][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Maximize the Total Height of Unique Towers +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximize-the-total-height-of-unique-towers/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3301.Maximize-the-Total-Height-of-Unique-Towers/Solution.go b/leetcode/3301-3400/3301.Maximize-the-Total-Height-of-Unique-Towers/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3301.Maximize-the-Total-Height-of-Unique-Towers/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3301.Maximize-the-Total-Height-of-Unique-Towers/Solution_test.go b/leetcode/3301-3400/3301.Maximize-the-Total-Height-of-Unique-Towers/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3301.Maximize-the-Total-Height-of-Unique-Towers/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3302.Find-the-Lexicographically-Smallest-Valid-Sequence/README.md b/leetcode/3301-3400/3302.Find-the-Lexicographically-Smallest-Valid-Sequence/README.md new file mode 100755 index 000000000..f6e0cc32e --- /dev/null +++ b/leetcode/3301-3400/3302.Find-the-Lexicographically-Smallest-Valid-Sequence/README.md @@ -0,0 +1,32 @@ +# [3302.Find the Lexicographically Smallest Valid Sequence][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Find the Lexicographically Smallest Valid Sequence +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/find-the-lexicographically-smallest-valid-sequence/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3302.Find-the-Lexicographically-Smallest-Valid-Sequence/Solution.go b/leetcode/3301-3400/3302.Find-the-Lexicographically-Smallest-Valid-Sequence/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3302.Find-the-Lexicographically-Smallest-Valid-Sequence/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3302.Find-the-Lexicographically-Smallest-Valid-Sequence/Solution_test.go b/leetcode/3301-3400/3302.Find-the-Lexicographically-Smallest-Valid-Sequence/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3302.Find-the-Lexicographically-Smallest-Valid-Sequence/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3303.Find-the-Occurrence-of-First-Almost-Equal-Substring/README.md b/leetcode/3301-3400/3303.Find-the-Occurrence-of-First-Almost-Equal-Substring/README.md new file mode 100755 index 000000000..b2835a0a2 --- /dev/null +++ b/leetcode/3301-3400/3303.Find-the-Occurrence-of-First-Almost-Equal-Substring/README.md @@ -0,0 +1,32 @@ +# [3303.Find the Occurrence of First Almost Equal Substring][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Find the Occurrence of First Almost Equal Substring +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/find-the-occurrence-of-first-almost-equal-substring/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3303.Find-the-Occurrence-of-First-Almost-Equal-Substring/Solution.go b/leetcode/3301-3400/3303.Find-the-Occurrence-of-First-Almost-Equal-Substring/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3303.Find-the-Occurrence-of-First-Almost-Equal-Substring/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3303.Find-the-Occurrence-of-First-Almost-Equal-Substring/Solution_test.go b/leetcode/3301-3400/3303.Find-the-Occurrence-of-First-Almost-Equal-Substring/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3303.Find-the-Occurrence-of-First-Almost-Equal-Substring/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3304.Find-the-K-th-Character-in-String-Game-I/README.md b/leetcode/3301-3400/3304.Find-the-K-th-Character-in-String-Game-I/README.md new file mode 100755 index 000000000..be2a86e6e --- /dev/null +++ b/leetcode/3301-3400/3304.Find-the-K-th-Character-in-String-Game-I/README.md @@ -0,0 +1,32 @@ +# [3304.Find the K-th Character in String Game I][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Find the K-th Character in String Game I +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/find-the-k-th-character-in-string-game-i/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3304.Find-the-K-th-Character-in-String-Game-I/Solution.go b/leetcode/3301-3400/3304.Find-the-K-th-Character-in-String-Game-I/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3304.Find-the-K-th-Character-in-String-Game-I/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3304.Find-the-K-th-Character-in-String-Game-I/Solution_test.go b/leetcode/3301-3400/3304.Find-the-K-th-Character-in-String-Game-I/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3304.Find-the-K-th-Character-in-String-Game-I/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3305.Count-of-Substrings-Containing-Every-Vowel-and-K-Consonants-I/README.md b/leetcode/3301-3400/3305.Count-of-Substrings-Containing-Every-Vowel-and-K-Consonants-I/README.md new file mode 100755 index 000000000..fb822fa47 --- /dev/null +++ b/leetcode/3301-3400/3305.Count-of-Substrings-Containing-Every-Vowel-and-K-Consonants-I/README.md @@ -0,0 +1,32 @@ +# [3305.Count of Substrings Containing Every Vowel and K Consonants I][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Count of Substrings Containing Every Vowel and K Consonants I +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/count-of-substrings-containing-every-vowel-and-k-consonants-i/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3305.Count-of-Substrings-Containing-Every-Vowel-and-K-Consonants-I/Solution.go b/leetcode/3301-3400/3305.Count-of-Substrings-Containing-Every-Vowel-and-K-Consonants-I/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3305.Count-of-Substrings-Containing-Every-Vowel-and-K-Consonants-I/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3305.Count-of-Substrings-Containing-Every-Vowel-and-K-Consonants-I/Solution_test.go b/leetcode/3301-3400/3305.Count-of-Substrings-Containing-Every-Vowel-and-K-Consonants-I/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3305.Count-of-Substrings-Containing-Every-Vowel-and-K-Consonants-I/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3306.Count-of-Substrings-Containing-Every-Vowel-and-K-Consonants-II/README.md b/leetcode/3301-3400/3306.Count-of-Substrings-Containing-Every-Vowel-and-K-Consonants-II/README.md new file mode 100755 index 000000000..c7cf130b0 --- /dev/null +++ b/leetcode/3301-3400/3306.Count-of-Substrings-Containing-Every-Vowel-and-K-Consonants-II/README.md @@ -0,0 +1,32 @@ +# [3306.Count of Substrings Containing Every Vowel and K Consonants II][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Count of Substrings Containing Every Vowel and K Consonants II +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/count-of-substrings-containing-every-vowel-and-k-consonants-ii/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3306.Count-of-Substrings-Containing-Every-Vowel-and-K-Consonants-II/Solution.go b/leetcode/3301-3400/3306.Count-of-Substrings-Containing-Every-Vowel-and-K-Consonants-II/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3306.Count-of-Substrings-Containing-Every-Vowel-and-K-Consonants-II/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3306.Count-of-Substrings-Containing-Every-Vowel-and-K-Consonants-II/Solution_test.go b/leetcode/3301-3400/3306.Count-of-Substrings-Containing-Every-Vowel-and-K-Consonants-II/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3306.Count-of-Substrings-Containing-Every-Vowel-and-K-Consonants-II/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3307.Find-the-K-th-Character-in-String-Game-II/README.md b/leetcode/3301-3400/3307.Find-the-K-th-Character-in-String-Game-II/README.md new file mode 100755 index 000000000..338708360 --- /dev/null +++ b/leetcode/3301-3400/3307.Find-the-K-th-Character-in-String-Game-II/README.md @@ -0,0 +1,32 @@ +# [3307.Find the K-th Character in String Game II][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Find the K-th Character in String Game II +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/find-the-k-th-character-in-string-game-ii/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3307.Find-the-K-th-Character-in-String-Game-II/Solution.go b/leetcode/3301-3400/3307.Find-the-K-th-Character-in-String-Game-II/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3307.Find-the-K-th-Character-in-String-Game-II/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3307.Find-the-K-th-Character-in-String-Game-II/Solution_test.go b/leetcode/3301-3400/3307.Find-the-K-th-Character-in-String-Game-II/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3307.Find-the-K-th-Character-in-String-Game-II/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3309.Maximum-Possible-Number-by-Binary-Concatenation/README.md b/leetcode/3301-3400/3309.Maximum-Possible-Number-by-Binary-Concatenation/README.md new file mode 100755 index 000000000..6ebc10daa --- /dev/null +++ b/leetcode/3301-3400/3309.Maximum-Possible-Number-by-Binary-Concatenation/README.md @@ -0,0 +1,32 @@ +# [3309.Maximum Possible Number by Binary Concatenation][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Maximum Possible Number by Binary Concatenation +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximum-possible-number-by-binary-concatenation/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3309.Maximum-Possible-Number-by-Binary-Concatenation/Solution.go b/leetcode/3301-3400/3309.Maximum-Possible-Number-by-Binary-Concatenation/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3309.Maximum-Possible-Number-by-Binary-Concatenation/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3309.Maximum-Possible-Number-by-Binary-Concatenation/Solution_test.go b/leetcode/3301-3400/3309.Maximum-Possible-Number-by-Binary-Concatenation/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3309.Maximum-Possible-Number-by-Binary-Concatenation/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3310.Remove-Methods-From-Project/README.md b/leetcode/3301-3400/3310.Remove-Methods-From-Project/README.md new file mode 100755 index 000000000..4ae8edce8 --- /dev/null +++ b/leetcode/3301-3400/3310.Remove-Methods-From-Project/README.md @@ -0,0 +1,32 @@ +# [3310.Remove Methods From Project][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Remove Methods From Project +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/remove-methods-from-project/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3310.Remove-Methods-From-Project/Solution.go b/leetcode/3301-3400/3310.Remove-Methods-From-Project/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3310.Remove-Methods-From-Project/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3310.Remove-Methods-From-Project/Solution_test.go b/leetcode/3301-3400/3310.Remove-Methods-From-Project/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3310.Remove-Methods-From-Project/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3311.Construct-2D-Grid-Matching-Graph-Layout/README.md b/leetcode/3301-3400/3311.Construct-2D-Grid-Matching-Graph-Layout/README.md new file mode 100755 index 000000000..4030a6d0f --- /dev/null +++ b/leetcode/3301-3400/3311.Construct-2D-Grid-Matching-Graph-Layout/README.md @@ -0,0 +1,32 @@ +# [3311.Construct 2D Grid Matching Graph Layout][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Construct 2D Grid Matching Graph Layout +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/construct-2d-grid-matching-graph-layout/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3311.Construct-2D-Grid-Matching-Graph-Layout/Solution.go b/leetcode/3301-3400/3311.Construct-2D-Grid-Matching-Graph-Layout/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3311.Construct-2D-Grid-Matching-Graph-Layout/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3311.Construct-2D-Grid-Matching-Graph-Layout/Solution_test.go b/leetcode/3301-3400/3311.Construct-2D-Grid-Matching-Graph-Layout/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3311.Construct-2D-Grid-Matching-Graph-Layout/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3312.Sorted-GCD-Pair-Queries/README.md b/leetcode/3301-3400/3312.Sorted-GCD-Pair-Queries/README.md new file mode 100755 index 000000000..3770b97e7 --- /dev/null +++ b/leetcode/3301-3400/3312.Sorted-GCD-Pair-Queries/README.md @@ -0,0 +1,32 @@ +# [3312.Sorted GCD Pair Queries][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Sorted GCD Pair Queries +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/sorted-gcd-pair-queries/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3312.Sorted-GCD-Pair-Queries/Solution.go b/leetcode/3301-3400/3312.Sorted-GCD-Pair-Queries/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3312.Sorted-GCD-Pair-Queries/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3312.Sorted-GCD-Pair-Queries/Solution_test.go b/leetcode/3301-3400/3312.Sorted-GCD-Pair-Queries/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3312.Sorted-GCD-Pair-Queries/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3314.Construct-the-Minimum-Bitwise-Array-I/README.md b/leetcode/3301-3400/3314.Construct-the-Minimum-Bitwise-Array-I/README.md new file mode 100755 index 000000000..44f685f66 --- /dev/null +++ b/leetcode/3301-3400/3314.Construct-the-Minimum-Bitwise-Array-I/README.md @@ -0,0 +1,32 @@ +# [3314.Construct the Minimum Bitwise Array I][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Construct the Minimum Bitwise Array I +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/construct-the-minimum-bitwise-array-i/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3314.Construct-the-Minimum-Bitwise-Array-I/Solution.go b/leetcode/3301-3400/3314.Construct-the-Minimum-Bitwise-Array-I/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3314.Construct-the-Minimum-Bitwise-Array-I/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3314.Construct-the-Minimum-Bitwise-Array-I/Solution_test.go b/leetcode/3301-3400/3314.Construct-the-Minimum-Bitwise-Array-I/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3314.Construct-the-Minimum-Bitwise-Array-I/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3315.Construct-the-Minimum-Bitwise-Array-II/README.md b/leetcode/3301-3400/3315.Construct-the-Minimum-Bitwise-Array-II/README.md new file mode 100755 index 000000000..3f9ee8f17 --- /dev/null +++ b/leetcode/3301-3400/3315.Construct-the-Minimum-Bitwise-Array-II/README.md @@ -0,0 +1,32 @@ +# [3315.Construct the Minimum Bitwise Array II][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Construct the Minimum Bitwise Array II +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/construct-the-minimum-bitwise-array-ii/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3315.Construct-the-Minimum-Bitwise-Array-II/Solution.go b/leetcode/3301-3400/3315.Construct-the-Minimum-Bitwise-Array-II/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3315.Construct-the-Minimum-Bitwise-Array-II/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3315.Construct-the-Minimum-Bitwise-Array-II/Solution_test.go b/leetcode/3301-3400/3315.Construct-the-Minimum-Bitwise-Array-II/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3315.Construct-the-Minimum-Bitwise-Array-II/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3316.Find-Maximum-Removals-From-Source-String/README.md b/leetcode/3301-3400/3316.Find-Maximum-Removals-From-Source-String/README.md new file mode 100755 index 000000000..a948aad71 --- /dev/null +++ b/leetcode/3301-3400/3316.Find-Maximum-Removals-From-Source-String/README.md @@ -0,0 +1,32 @@ +# [3316.Find Maximum Removals From Source String][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Find Maximum Removals From Source String +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/find-maximum-removals-from-source-string/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3316.Find-Maximum-Removals-From-Source-String/Solution.go b/leetcode/3301-3400/3316.Find-Maximum-Removals-From-Source-String/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3316.Find-Maximum-Removals-From-Source-String/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3316.Find-Maximum-Removals-From-Source-String/Solution_test.go b/leetcode/3301-3400/3316.Find-Maximum-Removals-From-Source-String/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3316.Find-Maximum-Removals-From-Source-String/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3317.Find-the-Number-of-Possible-Ways-for-an-Event/README.md b/leetcode/3301-3400/3317.Find-the-Number-of-Possible-Ways-for-an-Event/README.md new file mode 100755 index 000000000..4f07766e0 --- /dev/null +++ b/leetcode/3301-3400/3317.Find-the-Number-of-Possible-Ways-for-an-Event/README.md @@ -0,0 +1,32 @@ +# [3317.Find the Number of Possible Ways for an Event][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Find the Number of Possible Ways for an Event +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/find-the-number-of-possible-ways-for-an-event/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3317.Find-the-Number-of-Possible-Ways-for-an-Event/Solution.go b/leetcode/3301-3400/3317.Find-the-Number-of-Possible-Ways-for-an-Event/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3317.Find-the-Number-of-Possible-Ways-for-an-Event/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3317.Find-the-Number-of-Possible-Ways-for-an-Event/Solution_test.go b/leetcode/3301-3400/3317.Find-the-Number-of-Possible-Ways-for-an-Event/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3317.Find-the-Number-of-Possible-Ways-for-an-Event/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3318.Find-X-Sum-of-All-K-Long-Subarrays-I/README.md b/leetcode/3301-3400/3318.Find-X-Sum-of-All-K-Long-Subarrays-I/README.md new file mode 100755 index 000000000..4e5204fb8 --- /dev/null +++ b/leetcode/3301-3400/3318.Find-X-Sum-of-All-K-Long-Subarrays-I/README.md @@ -0,0 +1,32 @@ +# [3318.Find X-Sum of All K-Long Subarrays I][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Find X-Sum of All K-Long Subarrays I +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/find-x-sum-of-all-k-long-subarrays-i/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3318.Find-X-Sum-of-All-K-Long-Subarrays-I/Solution.go b/leetcode/3301-3400/3318.Find-X-Sum-of-All-K-Long-Subarrays-I/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3318.Find-X-Sum-of-All-K-Long-Subarrays-I/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3318.Find-X-Sum-of-All-K-Long-Subarrays-I/Solution_test.go b/leetcode/3301-3400/3318.Find-X-Sum-of-All-K-Long-Subarrays-I/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3318.Find-X-Sum-of-All-K-Long-Subarrays-I/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3319.K-th-Largest-Perfect-Subtree-Size-in-Binary-Tree/README.md b/leetcode/3301-3400/3319.K-th-Largest-Perfect-Subtree-Size-in-Binary-Tree/README.md new file mode 100755 index 000000000..9bbdbc933 --- /dev/null +++ b/leetcode/3301-3400/3319.K-th-Largest-Perfect-Subtree-Size-in-Binary-Tree/README.md @@ -0,0 +1,32 @@ +# [3319.K-th Largest Perfect Subtree Size in Binary Tree][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +K-th Largest Perfect Subtree Size in Binary Tree +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/k-th-largest-perfect-subtree-size-in-binary-tree/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3319.K-th-Largest-Perfect-Subtree-Size-in-Binary-Tree/Solution.go b/leetcode/3301-3400/3319.K-th-Largest-Perfect-Subtree-Size-in-Binary-Tree/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3319.K-th-Largest-Perfect-Subtree-Size-in-Binary-Tree/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3319.K-th-Largest-Perfect-Subtree-Size-in-Binary-Tree/Solution_test.go b/leetcode/3301-3400/3319.K-th-Largest-Perfect-Subtree-Size-in-Binary-Tree/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3319.K-th-Largest-Perfect-Subtree-Size-in-Binary-Tree/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3320.Count-The-Number-of-Winning-Sequences/README.md b/leetcode/3301-3400/3320.Count-The-Number-of-Winning-Sequences/README.md new file mode 100755 index 000000000..11daa4b29 --- /dev/null +++ b/leetcode/3301-3400/3320.Count-The-Number-of-Winning-Sequences/README.md @@ -0,0 +1,32 @@ +# [3320.Count The Number of Winning Sequences][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Count The Number of Winning Sequences +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/count-the-number-of-winning-sequences/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3320.Count-The-Number-of-Winning-Sequences/Solution.go b/leetcode/3301-3400/3320.Count-The-Number-of-Winning-Sequences/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3320.Count-The-Number-of-Winning-Sequences/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3320.Count-The-Number-of-Winning-Sequences/Solution_test.go b/leetcode/3301-3400/3320.Count-The-Number-of-Winning-Sequences/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3320.Count-The-Number-of-Winning-Sequences/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3321.Find-X-Sum-of-All-K-Long-Subarrays-II/README.md b/leetcode/3301-3400/3321.Find-X-Sum-of-All-K-Long-Subarrays-II/README.md new file mode 100755 index 000000000..a0d20fb01 --- /dev/null +++ b/leetcode/3301-3400/3321.Find-X-Sum-of-All-K-Long-Subarrays-II/README.md @@ -0,0 +1,32 @@ +# [3321.Find X-Sum of All K-Long Subarrays II][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Find X-Sum of All K-Long Subarrays II +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/find-x-sum-of-all-k-long-subarrays-ii/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3321.Find-X-Sum-of-All-K-Long-Subarrays-II/Solution.go b/leetcode/3301-3400/3321.Find-X-Sum-of-All-K-Long-Subarrays-II/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3321.Find-X-Sum-of-All-K-Long-Subarrays-II/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3321.Find-X-Sum-of-All-K-Long-Subarrays-II/Solution_test.go b/leetcode/3301-3400/3321.Find-X-Sum-of-All-K-Long-Subarrays-II/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3321.Find-X-Sum-of-All-K-Long-Subarrays-II/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3324.Find-the-Sequence-of-Strings-Appeared-on-the-Screen/README.md b/leetcode/3301-3400/3324.Find-the-Sequence-of-Strings-Appeared-on-the-Screen/README.md new file mode 100755 index 000000000..1bd165161 --- /dev/null +++ b/leetcode/3301-3400/3324.Find-the-Sequence-of-Strings-Appeared-on-the-Screen/README.md @@ -0,0 +1,32 @@ +# [3324.Find the Sequence of Strings Appeared on the Screen][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Find the Sequence of Strings Appeared on the Screen +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/find-the-sequence-of-strings-appeared-on-the-screen/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3324.Find-the-Sequence-of-Strings-Appeared-on-the-Screen/Solution.go b/leetcode/3301-3400/3324.Find-the-Sequence-of-Strings-Appeared-on-the-Screen/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3324.Find-the-Sequence-of-Strings-Appeared-on-the-Screen/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3324.Find-the-Sequence-of-Strings-Appeared-on-the-Screen/Solution_test.go b/leetcode/3301-3400/3324.Find-the-Sequence-of-Strings-Appeared-on-the-Screen/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3324.Find-the-Sequence-of-Strings-Appeared-on-the-Screen/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3325.Count-Substrings-With-K-Frequency-Characters-I/README.md b/leetcode/3301-3400/3325.Count-Substrings-With-K-Frequency-Characters-I/README.md new file mode 100755 index 000000000..0493cb391 --- /dev/null +++ b/leetcode/3301-3400/3325.Count-Substrings-With-K-Frequency-Characters-I/README.md @@ -0,0 +1,32 @@ +# [3325.Count Substrings With K-Frequency Characters I][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Count Substrings With K-Frequency Characters I +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/count-substrings-with-k-frequency-characters-i/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3325.Count-Substrings-With-K-Frequency-Characters-I/Solution.go b/leetcode/3301-3400/3325.Count-Substrings-With-K-Frequency-Characters-I/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3325.Count-Substrings-With-K-Frequency-Characters-I/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3325.Count-Substrings-With-K-Frequency-Characters-I/Solution_test.go b/leetcode/3301-3400/3325.Count-Substrings-With-K-Frequency-Characters-I/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3325.Count-Substrings-With-K-Frequency-Characters-I/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3326.Minimum-Division-Operations-to-Make-Array-Non-Decreasing/README.md b/leetcode/3301-3400/3326.Minimum-Division-Operations-to-Make-Array-Non-Decreasing/README.md new file mode 100755 index 000000000..b6e3115d8 --- /dev/null +++ b/leetcode/3301-3400/3326.Minimum-Division-Operations-to-Make-Array-Non-Decreasing/README.md @@ -0,0 +1,32 @@ +# [3326.Minimum Division Operations to Make Array Non Decreasing][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Minimum Division Operations to Make Array Non Decreasing +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/minimum-division-operations-to-make-array-non-decreasing/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3326.Minimum-Division-Operations-to-Make-Array-Non-Decreasing/Solution.go b/leetcode/3301-3400/3326.Minimum-Division-Operations-to-Make-Array-Non-Decreasing/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3326.Minimum-Division-Operations-to-Make-Array-Non-Decreasing/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3326.Minimum-Division-Operations-to-Make-Array-Non-Decreasing/Solution_test.go b/leetcode/3301-3400/3326.Minimum-Division-Operations-to-Make-Array-Non-Decreasing/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3326.Minimum-Division-Operations-to-Make-Array-Non-Decreasing/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3327.Check-if-DFS-Strings-Are-Palindromes/README.md b/leetcode/3301-3400/3327.Check-if-DFS-Strings-Are-Palindromes/README.md new file mode 100755 index 000000000..e243b1df9 --- /dev/null +++ b/leetcode/3301-3400/3327.Check-if-DFS-Strings-Are-Palindromes/README.md @@ -0,0 +1,32 @@ +# [3327.Check if DFS Strings Are Palindromes][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Check if DFS Strings Are Palindromes +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/check-if-dfs-strings-are-palindromes/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3327.Check-if-DFS-Strings-Are-Palindromes/Solution.go b/leetcode/3301-3400/3327.Check-if-DFS-Strings-Are-Palindromes/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3327.Check-if-DFS-Strings-Are-Palindromes/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3327.Check-if-DFS-Strings-Are-Palindromes/Solution_test.go b/leetcode/3301-3400/3327.Check-if-DFS-Strings-Are-Palindromes/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3327.Check-if-DFS-Strings-Are-Palindromes/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3330.Find-the-Original-Typed-String-I/README.md b/leetcode/3301-3400/3330.Find-the-Original-Typed-String-I/README.md new file mode 100755 index 000000000..21f9634dc --- /dev/null +++ b/leetcode/3301-3400/3330.Find-the-Original-Typed-String-I/README.md @@ -0,0 +1,32 @@ +# [3330.Find the Original Typed String I][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Find the Original Typed String I +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/find-the-original-typed-string-i/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3330.Find-the-Original-Typed-String-I/Solution.go b/leetcode/3301-3400/3330.Find-the-Original-Typed-String-I/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3330.Find-the-Original-Typed-String-I/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3330.Find-the-Original-Typed-String-I/Solution_test.go b/leetcode/3301-3400/3330.Find-the-Original-Typed-String-I/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3330.Find-the-Original-Typed-String-I/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3331.Find-Subtree-Sizes-After-Changes/README.md b/leetcode/3301-3400/3331.Find-Subtree-Sizes-After-Changes/README.md new file mode 100755 index 000000000..34151aa22 --- /dev/null +++ b/leetcode/3301-3400/3331.Find-Subtree-Sizes-After-Changes/README.md @@ -0,0 +1,32 @@ +# [3331.Find Subtree Sizes After Changes][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Find Subtree Sizes After Changes +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/find-subtree-sizes-after-changes/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3331.Find-Subtree-Sizes-After-Changes/Solution.go b/leetcode/3301-3400/3331.Find-Subtree-Sizes-After-Changes/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3331.Find-Subtree-Sizes-After-Changes/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3331.Find-Subtree-Sizes-After-Changes/Solution_test.go b/leetcode/3301-3400/3331.Find-Subtree-Sizes-After-Changes/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3331.Find-Subtree-Sizes-After-Changes/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3332.Maximum-Points-Tourist-Can-Earn/README.md b/leetcode/3301-3400/3332.Maximum-Points-Tourist-Can-Earn/README.md new file mode 100755 index 000000000..d9d4bec31 --- /dev/null +++ b/leetcode/3301-3400/3332.Maximum-Points-Tourist-Can-Earn/README.md @@ -0,0 +1,32 @@ +# [3332.Maximum Points Tourist Can Earn][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Maximum Points Tourist Can Earn +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximum-points-tourist-can-earn/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3332.Maximum-Points-Tourist-Can-Earn/Solution.go b/leetcode/3301-3400/3332.Maximum-Points-Tourist-Can-Earn/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3332.Maximum-Points-Tourist-Can-Earn/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3332.Maximum-Points-Tourist-Can-Earn/Solution_test.go b/leetcode/3301-3400/3332.Maximum-Points-Tourist-Can-Earn/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3332.Maximum-Points-Tourist-Can-Earn/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3333.Find-the-Original-Typed-String-II/README.md b/leetcode/3301-3400/3333.Find-the-Original-Typed-String-II/README.md new file mode 100755 index 000000000..bf77b439d --- /dev/null +++ b/leetcode/3301-3400/3333.Find-the-Original-Typed-String-II/README.md @@ -0,0 +1,32 @@ +# [3333.Find the Original Typed String II][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Find the Original Typed String II +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/find-the-original-typed-string-ii/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3333.Find-the-Original-Typed-String-II/Solution.go b/leetcode/3301-3400/3333.Find-the-Original-Typed-String-II/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3333.Find-the-Original-Typed-String-II/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3333.Find-the-Original-Typed-String-II/Solution_test.go b/leetcode/3301-3400/3333.Find-the-Original-Typed-String-II/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3333.Find-the-Original-Typed-String-II/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3334.Find-the-Maximum-Factor-Score-of-Array/README.md b/leetcode/3301-3400/3334.Find-the-Maximum-Factor-Score-of-Array/README.md new file mode 100755 index 000000000..07d053129 --- /dev/null +++ b/leetcode/3301-3400/3334.Find-the-Maximum-Factor-Score-of-Array/README.md @@ -0,0 +1,32 @@ +# [3334.Find the Maximum Factor Score of Array][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Find the Maximum Factor Score of Array +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/find-the-maximum-factor-score-of-array/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3334.Find-the-Maximum-Factor-Score-of-Array/Solution.go b/leetcode/3301-3400/3334.Find-the-Maximum-Factor-Score-of-Array/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3334.Find-the-Maximum-Factor-Score-of-Array/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3334.Find-the-Maximum-Factor-Score-of-Array/Solution_test.go b/leetcode/3301-3400/3334.Find-the-Maximum-Factor-Score-of-Array/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3334.Find-the-Maximum-Factor-Score-of-Array/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3335.Total-Characters-in-String-After-Transformations-I/README.md b/leetcode/3301-3400/3335.Total-Characters-in-String-After-Transformations-I/README.md new file mode 100755 index 000000000..9f43350bb --- /dev/null +++ b/leetcode/3301-3400/3335.Total-Characters-in-String-After-Transformations-I/README.md @@ -0,0 +1,32 @@ +# [3335.Total Characters in String After Transformations I][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Total Characters in String After Transformations I +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/total-characters-in-string-after-transformations-i/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3335.Total-Characters-in-String-After-Transformations-I/Solution.go b/leetcode/3301-3400/3335.Total-Characters-in-String-After-Transformations-I/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3335.Total-Characters-in-String-After-Transformations-I/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3335.Total-Characters-in-String-After-Transformations-I/Solution_test.go b/leetcode/3301-3400/3335.Total-Characters-in-String-After-Transformations-I/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3335.Total-Characters-in-String-After-Transformations-I/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3336.Find-the-Number-of-Subsequences-With-Equal-GCD/README.md b/leetcode/3301-3400/3336.Find-the-Number-of-Subsequences-With-Equal-GCD/README.md new file mode 100755 index 000000000..e66525e6b --- /dev/null +++ b/leetcode/3301-3400/3336.Find-the-Number-of-Subsequences-With-Equal-GCD/README.md @@ -0,0 +1,32 @@ +# [3336.Find the Number of Subsequences With Equal GCD][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Find the Number of Subsequences With Equal GCD +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/find-the-number-of-subsequences-with-equal-gcd/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3336.Find-the-Number-of-Subsequences-With-Equal-GCD/Solution.go b/leetcode/3301-3400/3336.Find-the-Number-of-Subsequences-With-Equal-GCD/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3336.Find-the-Number-of-Subsequences-With-Equal-GCD/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3336.Find-the-Number-of-Subsequences-With-Equal-GCD/Solution_test.go b/leetcode/3301-3400/3336.Find-the-Number-of-Subsequences-With-Equal-GCD/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3336.Find-the-Number-of-Subsequences-With-Equal-GCD/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3337.Total-Characters-in-String-After-Transformations-II/README.md b/leetcode/3301-3400/3337.Total-Characters-in-String-After-Transformations-II/README.md new file mode 100755 index 000000000..56158ae48 --- /dev/null +++ b/leetcode/3301-3400/3337.Total-Characters-in-String-After-Transformations-II/README.md @@ -0,0 +1,32 @@ +# [3337.Total Characters in String After Transformations II][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Total Characters in String After Transformations II +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/total-characters-in-string-after-transformations-ii/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3337.Total-Characters-in-String-After-Transformations-II/Solution.go b/leetcode/3301-3400/3337.Total-Characters-in-String-After-Transformations-II/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3337.Total-Characters-in-String-After-Transformations-II/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3337.Total-Characters-in-String-After-Transformations-II/Solution_test.go b/leetcode/3301-3400/3337.Total-Characters-in-String-After-Transformations-II/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3337.Total-Characters-in-String-After-Transformations-II/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3340.Check-Balanced-String/README.md b/leetcode/3301-3400/3340.Check-Balanced-String/README.md new file mode 100755 index 000000000..f4245fa69 --- /dev/null +++ b/leetcode/3301-3400/3340.Check-Balanced-String/README.md @@ -0,0 +1,32 @@ +# [3340.Check Balanced String][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Check Balanced String +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/check-balanced-string/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3340.Check-Balanced-String/Solution.go b/leetcode/3301-3400/3340.Check-Balanced-String/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3340.Check-Balanced-String/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3340.Check-Balanced-String/Solution_test.go b/leetcode/3301-3400/3340.Check-Balanced-String/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3340.Check-Balanced-String/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3341.Find-Minimum-Time-to-Reach-Last-Room-I/README.md b/leetcode/3301-3400/3341.Find-Minimum-Time-to-Reach-Last-Room-I/README.md new file mode 100755 index 000000000..29935036c --- /dev/null +++ b/leetcode/3301-3400/3341.Find-Minimum-Time-to-Reach-Last-Room-I/README.md @@ -0,0 +1,32 @@ +# [3341.Find Minimum Time to Reach Last Room I][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Find Minimum Time to Reach Last Room I +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/find-minimum-time-to-reach-last-room-i/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3341.Find-Minimum-Time-to-Reach-Last-Room-I/Solution.go b/leetcode/3301-3400/3341.Find-Minimum-Time-to-Reach-Last-Room-I/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3341.Find-Minimum-Time-to-Reach-Last-Room-I/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3341.Find-Minimum-Time-to-Reach-Last-Room-I/Solution_test.go b/leetcode/3301-3400/3341.Find-Minimum-Time-to-Reach-Last-Room-I/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3341.Find-Minimum-Time-to-Reach-Last-Room-I/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3342.Find-Minimum-Time-to-Reach-Last-Room-II/README.md b/leetcode/3301-3400/3342.Find-Minimum-Time-to-Reach-Last-Room-II/README.md new file mode 100755 index 000000000..c2bf27985 --- /dev/null +++ b/leetcode/3301-3400/3342.Find-Minimum-Time-to-Reach-Last-Room-II/README.md @@ -0,0 +1,32 @@ +# [3342.Find Minimum Time to Reach Last Room II][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Find Minimum Time to Reach Last Room II +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/find-minimum-time-to-reach-last-room-ii/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3342.Find-Minimum-Time-to-Reach-Last-Room-II/Solution.go b/leetcode/3301-3400/3342.Find-Minimum-Time-to-Reach-Last-Room-II/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3342.Find-Minimum-Time-to-Reach-Last-Room-II/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3342.Find-Minimum-Time-to-Reach-Last-Room-II/Solution_test.go b/leetcode/3301-3400/3342.Find-Minimum-Time-to-Reach-Last-Room-II/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3342.Find-Minimum-Time-to-Reach-Last-Room-II/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3343.Count-Number-of-Balanced-Permutations/README.md b/leetcode/3301-3400/3343.Count-Number-of-Balanced-Permutations/README.md new file mode 100755 index 000000000..5758e85b3 --- /dev/null +++ b/leetcode/3301-3400/3343.Count-Number-of-Balanced-Permutations/README.md @@ -0,0 +1,32 @@ +# [3343.Count Number of Balanced Permutations][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Count Number of Balanced Permutations +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/count-number-of-balanced-permutations/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3343.Count-Number-of-Balanced-Permutations/Solution.go b/leetcode/3301-3400/3343.Count-Number-of-Balanced-Permutations/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3343.Count-Number-of-Balanced-Permutations/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3343.Count-Number-of-Balanced-Permutations/Solution_test.go b/leetcode/3301-3400/3343.Count-Number-of-Balanced-Permutations/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3343.Count-Number-of-Balanced-Permutations/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3345.Smallest-Divisible-Digit-Product-I/README.md b/leetcode/3301-3400/3345.Smallest-Divisible-Digit-Product-I/README.md new file mode 100755 index 000000000..0e0efdf49 --- /dev/null +++ b/leetcode/3301-3400/3345.Smallest-Divisible-Digit-Product-I/README.md @@ -0,0 +1,32 @@ +# [3345.Smallest Divisible Digit Product I][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Smallest Divisible Digit Product I +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/smallest-divisible-digit-product-i/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3345.Smallest-Divisible-Digit-Product-I/Solution.go b/leetcode/3301-3400/3345.Smallest-Divisible-Digit-Product-I/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3345.Smallest-Divisible-Digit-Product-I/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3345.Smallest-Divisible-Digit-Product-I/Solution_test.go b/leetcode/3301-3400/3345.Smallest-Divisible-Digit-Product-I/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3345.Smallest-Divisible-Digit-Product-I/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3346.Maximum-Frequency-of-an-Element-After-Performing-Operations-I/README.md b/leetcode/3301-3400/3346.Maximum-Frequency-of-an-Element-After-Performing-Operations-I/README.md new file mode 100755 index 000000000..7ac632cae --- /dev/null +++ b/leetcode/3301-3400/3346.Maximum-Frequency-of-an-Element-After-Performing-Operations-I/README.md @@ -0,0 +1,32 @@ +# [3346.Maximum Frequency of an Element After Performing Operations I][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Maximum Frequency of an Element After Performing Operations I +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximum-frequency-of-an-element-after-performing-operations-i/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3346.Maximum-Frequency-of-an-Element-After-Performing-Operations-I/Solution.go b/leetcode/3301-3400/3346.Maximum-Frequency-of-an-Element-After-Performing-Operations-I/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3346.Maximum-Frequency-of-an-Element-After-Performing-Operations-I/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3346.Maximum-Frequency-of-an-Element-After-Performing-Operations-I/Solution_test.go b/leetcode/3301-3400/3346.Maximum-Frequency-of-an-Element-After-Performing-Operations-I/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3346.Maximum-Frequency-of-an-Element-After-Performing-Operations-I/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3347.Maximum-Frequency-of-an-Element-After-Performing-Operations-II/README.md b/leetcode/3301-3400/3347.Maximum-Frequency-of-an-Element-After-Performing-Operations-II/README.md new file mode 100755 index 000000000..b5e3be604 --- /dev/null +++ b/leetcode/3301-3400/3347.Maximum-Frequency-of-an-Element-After-Performing-Operations-II/README.md @@ -0,0 +1,32 @@ +# [3347.Maximum Frequency of an Element After Performing Operations II][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Maximum Frequency of an Element After Performing Operations II +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximum-frequency-of-an-element-after-performing-operations-ii/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3347.Maximum-Frequency-of-an-Element-After-Performing-Operations-II/Solution.go b/leetcode/3301-3400/3347.Maximum-Frequency-of-an-Element-After-Performing-Operations-II/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3347.Maximum-Frequency-of-an-Element-After-Performing-Operations-II/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3347.Maximum-Frequency-of-an-Element-After-Performing-Operations-II/Solution_test.go b/leetcode/3301-3400/3347.Maximum-Frequency-of-an-Element-After-Performing-Operations-II/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3347.Maximum-Frequency-of-an-Element-After-Performing-Operations-II/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3348.Smallest-Divisible-Digit-Product-II/README.md b/leetcode/3301-3400/3348.Smallest-Divisible-Digit-Product-II/README.md new file mode 100755 index 000000000..a53812126 --- /dev/null +++ b/leetcode/3301-3400/3348.Smallest-Divisible-Digit-Product-II/README.md @@ -0,0 +1,32 @@ +# [3348.Smallest Divisible Digit Product II][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Smallest Divisible Digit Product II +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/smallest-divisible-digit-product-ii/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3348.Smallest-Divisible-Digit-Product-II/Solution.go b/leetcode/3301-3400/3348.Smallest-Divisible-Digit-Product-II/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3348.Smallest-Divisible-Digit-Product-II/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3348.Smallest-Divisible-Digit-Product-II/Solution_test.go b/leetcode/3301-3400/3348.Smallest-Divisible-Digit-Product-II/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3348.Smallest-Divisible-Digit-Product-II/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3349.Adjacent-Increasing-Subarrays-Detection-I/README.md b/leetcode/3301-3400/3349.Adjacent-Increasing-Subarrays-Detection-I/README.md new file mode 100755 index 000000000..28390af4c --- /dev/null +++ b/leetcode/3301-3400/3349.Adjacent-Increasing-Subarrays-Detection-I/README.md @@ -0,0 +1,32 @@ +# [3349.Adjacent Increasing Subarrays Detection I][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Adjacent Increasing Subarrays Detection I +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/adjacent-increasing-subarrays-detection-i/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3349.Adjacent-Increasing-Subarrays-Detection-I/Solution.go b/leetcode/3301-3400/3349.Adjacent-Increasing-Subarrays-Detection-I/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3349.Adjacent-Increasing-Subarrays-Detection-I/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3349.Adjacent-Increasing-Subarrays-Detection-I/Solution_test.go b/leetcode/3301-3400/3349.Adjacent-Increasing-Subarrays-Detection-I/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3349.Adjacent-Increasing-Subarrays-Detection-I/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3350.Adjacent-Increasing-Subarrays-Detection-II/README.md b/leetcode/3301-3400/3350.Adjacent-Increasing-Subarrays-Detection-II/README.md new file mode 100755 index 000000000..8c92bb31e --- /dev/null +++ b/leetcode/3301-3400/3350.Adjacent-Increasing-Subarrays-Detection-II/README.md @@ -0,0 +1,32 @@ +# [3350.Adjacent Increasing Subarrays Detection II][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Adjacent Increasing Subarrays Detection II +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/adjacent-increasing-subarrays-detection-ii/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3350.Adjacent-Increasing-Subarrays-Detection-II/Solution.go b/leetcode/3301-3400/3350.Adjacent-Increasing-Subarrays-Detection-II/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3350.Adjacent-Increasing-Subarrays-Detection-II/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3350.Adjacent-Increasing-Subarrays-Detection-II/Solution_test.go b/leetcode/3301-3400/3350.Adjacent-Increasing-Subarrays-Detection-II/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3350.Adjacent-Increasing-Subarrays-Detection-II/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3351.Sum-of-Good-Subsequences/README.md b/leetcode/3301-3400/3351.Sum-of-Good-Subsequences/README.md new file mode 100755 index 000000000..f634995b9 --- /dev/null +++ b/leetcode/3301-3400/3351.Sum-of-Good-Subsequences/README.md @@ -0,0 +1,32 @@ +# [3351.Sum of Good Subsequences][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Sum of Good Subsequences +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/sum-of-good-subsequences/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3351.Sum-of-Good-Subsequences/Solution.go b/leetcode/3301-3400/3351.Sum-of-Good-Subsequences/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3351.Sum-of-Good-Subsequences/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3351.Sum-of-Good-Subsequences/Solution_test.go b/leetcode/3301-3400/3351.Sum-of-Good-Subsequences/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3351.Sum-of-Good-Subsequences/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3352.Count-K-Reducible-Numbers-Less-Than-N/README.md b/leetcode/3301-3400/3352.Count-K-Reducible-Numbers-Less-Than-N/README.md new file mode 100755 index 000000000..601abbe60 --- /dev/null +++ b/leetcode/3301-3400/3352.Count-K-Reducible-Numbers-Less-Than-N/README.md @@ -0,0 +1,32 @@ +# [3352.Count K-Reducible Numbers Less Than N][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Count K-Reducible Numbers Less Than N +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/count-k-reducible-numbers-less-than-n/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3352.Count-K-Reducible-Numbers-Less-Than-N/Solution.go b/leetcode/3301-3400/3352.Count-K-Reducible-Numbers-Less-Than-N/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3352.Count-K-Reducible-Numbers-Less-Than-N/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3352.Count-K-Reducible-Numbers-Less-Than-N/Solution_test.go b/leetcode/3301-3400/3352.Count-K-Reducible-Numbers-Less-Than-N/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3352.Count-K-Reducible-Numbers-Less-Than-N/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3354.Make-Array-Elements-Equal-to-Zero/README.md b/leetcode/3301-3400/3354.Make-Array-Elements-Equal-to-Zero/README.md new file mode 100755 index 000000000..c47f9d4f9 --- /dev/null +++ b/leetcode/3301-3400/3354.Make-Array-Elements-Equal-to-Zero/README.md @@ -0,0 +1,32 @@ +# [3354.Make Array Elements Equal to Zero][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Make Array Elements Equal to Zero +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/make-array-elements-equal-to-zero/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3354.Make-Array-Elements-Equal-to-Zero/Solution.go b/leetcode/3301-3400/3354.Make-Array-Elements-Equal-to-Zero/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3354.Make-Array-Elements-Equal-to-Zero/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3354.Make-Array-Elements-Equal-to-Zero/Solution_test.go b/leetcode/3301-3400/3354.Make-Array-Elements-Equal-to-Zero/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3354.Make-Array-Elements-Equal-to-Zero/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3355.Zero-Array-Transformation-I/README.md b/leetcode/3301-3400/3355.Zero-Array-Transformation-I/README.md new file mode 100755 index 000000000..ed9347afb --- /dev/null +++ b/leetcode/3301-3400/3355.Zero-Array-Transformation-I/README.md @@ -0,0 +1,32 @@ +# [3355.Zero Array Transformation I][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Zero Array Transformation I +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/zero-array-transformation-i/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3355.Zero-Array-Transformation-I/Solution.go b/leetcode/3301-3400/3355.Zero-Array-Transformation-I/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3355.Zero-Array-Transformation-I/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3355.Zero-Array-Transformation-I/Solution_test.go b/leetcode/3301-3400/3355.Zero-Array-Transformation-I/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3355.Zero-Array-Transformation-I/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3356.Zero-Array-Transformation-II/README.md b/leetcode/3301-3400/3356.Zero-Array-Transformation-II/README.md new file mode 100755 index 000000000..9f60d7b59 --- /dev/null +++ b/leetcode/3301-3400/3356.Zero-Array-Transformation-II/README.md @@ -0,0 +1,32 @@ +# [3356.Zero Array Transformation II][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Zero Array Transformation II +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/zero-array-transformation-ii/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3356.Zero-Array-Transformation-II/Solution.go b/leetcode/3301-3400/3356.Zero-Array-Transformation-II/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3356.Zero-Array-Transformation-II/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3356.Zero-Array-Transformation-II/Solution_test.go b/leetcode/3301-3400/3356.Zero-Array-Transformation-II/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3356.Zero-Array-Transformation-II/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3357.Minimize-the-Maximum-Adjacent-Element-Difference/README.md b/leetcode/3301-3400/3357.Minimize-the-Maximum-Adjacent-Element-Difference/README.md new file mode 100755 index 000000000..e0dadf435 --- /dev/null +++ b/leetcode/3301-3400/3357.Minimize-the-Maximum-Adjacent-Element-Difference/README.md @@ -0,0 +1,32 @@ +# [3357.Minimize the Maximum Adjacent Element Difference][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Minimize the Maximum Adjacent Element Difference +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/minimize-the-maximum-adjacent-element-difference/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3357.Minimize-the-Maximum-Adjacent-Element-Difference/Solution.go b/leetcode/3301-3400/3357.Minimize-the-Maximum-Adjacent-Element-Difference/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3357.Minimize-the-Maximum-Adjacent-Element-Difference/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3357.Minimize-the-Maximum-Adjacent-Element-Difference/Solution_test.go b/leetcode/3301-3400/3357.Minimize-the-Maximum-Adjacent-Element-Difference/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3357.Minimize-the-Maximum-Adjacent-Element-Difference/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3360.Stone-Removal-Game/README.md b/leetcode/3301-3400/3360.Stone-Removal-Game/README.md new file mode 100755 index 000000000..4fd99960d --- /dev/null +++ b/leetcode/3301-3400/3360.Stone-Removal-Game/README.md @@ -0,0 +1,32 @@ +# [3360.Stone Removal Game][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Stone Removal Game +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/stone-removal-game/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3360.Stone-Removal-Game/Solution.go b/leetcode/3301-3400/3360.Stone-Removal-Game/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3360.Stone-Removal-Game/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3360.Stone-Removal-Game/Solution_test.go b/leetcode/3301-3400/3360.Stone-Removal-Game/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3360.Stone-Removal-Game/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3361.Shift-Distance-Between-Two-Strings/README.md b/leetcode/3301-3400/3361.Shift-Distance-Between-Two-Strings/README.md new file mode 100755 index 000000000..ceb97f376 --- /dev/null +++ b/leetcode/3301-3400/3361.Shift-Distance-Between-Two-Strings/README.md @@ -0,0 +1,32 @@ +# [3361.Shift Distance Between Two Strings][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Shift Distance Between Two Strings +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/shift-distance-between-two-strings/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3361.Shift-Distance-Between-Two-Strings/Solution.go b/leetcode/3301-3400/3361.Shift-Distance-Between-Two-Strings/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3361.Shift-Distance-Between-Two-Strings/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3361.Shift-Distance-Between-Two-Strings/Solution_test.go b/leetcode/3301-3400/3361.Shift-Distance-Between-Two-Strings/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3361.Shift-Distance-Between-Two-Strings/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3362.Zero-Array-Transformation-III/README.md b/leetcode/3301-3400/3362.Zero-Array-Transformation-III/README.md new file mode 100755 index 000000000..fb5595409 --- /dev/null +++ b/leetcode/3301-3400/3362.Zero-Array-Transformation-III/README.md @@ -0,0 +1,32 @@ +# [3362.Zero Array Transformation III][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Zero Array Transformation III +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/zero-array-transformation-iii/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3362.Zero-Array-Transformation-III/Solution.go b/leetcode/3301-3400/3362.Zero-Array-Transformation-III/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3362.Zero-Array-Transformation-III/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3362.Zero-Array-Transformation-III/Solution_test.go b/leetcode/3301-3400/3362.Zero-Array-Transformation-III/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3362.Zero-Array-Transformation-III/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3363.Find-the-Maximum-Number-of-Fruits-Collected/README.md b/leetcode/3301-3400/3363.Find-the-Maximum-Number-of-Fruits-Collected/README.md new file mode 100755 index 000000000..ecf357498 --- /dev/null +++ b/leetcode/3301-3400/3363.Find-the-Maximum-Number-of-Fruits-Collected/README.md @@ -0,0 +1,32 @@ +# [3363.Find the Maximum Number of Fruits Collected][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Find the Maximum Number of Fruits Collected +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/find-the-maximum-number-of-fruits-collected/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3363.Find-the-Maximum-Number-of-Fruits-Collected/Solution.go b/leetcode/3301-3400/3363.Find-the-Maximum-Number-of-Fruits-Collected/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3363.Find-the-Maximum-Number-of-Fruits-Collected/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3363.Find-the-Maximum-Number-of-Fruits-Collected/Solution_test.go b/leetcode/3301-3400/3363.Find-the-Maximum-Number-of-Fruits-Collected/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3363.Find-the-Maximum-Number-of-Fruits-Collected/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3364.Minimum-Positive-Sum-Subarray-/README.md b/leetcode/3301-3400/3364.Minimum-Positive-Sum-Subarray-/README.md new file mode 100755 index 000000000..e999a834f --- /dev/null +++ b/leetcode/3301-3400/3364.Minimum-Positive-Sum-Subarray-/README.md @@ -0,0 +1,32 @@ +# [3364.Minimum Positive Sum Subarray ][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Minimum Positive Sum Subarray +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/minimum-positive-sum-subarray/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3364.Minimum-Positive-Sum-Subarray-/Solution.go b/leetcode/3301-3400/3364.Minimum-Positive-Sum-Subarray-/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3364.Minimum-Positive-Sum-Subarray-/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3364.Minimum-Positive-Sum-Subarray-/Solution_test.go b/leetcode/3301-3400/3364.Minimum-Positive-Sum-Subarray-/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3364.Minimum-Positive-Sum-Subarray-/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3365.Rearrange-K-Substrings-to-Form-Target-String/README.md b/leetcode/3301-3400/3365.Rearrange-K-Substrings-to-Form-Target-String/README.md new file mode 100755 index 000000000..a42008c38 --- /dev/null +++ b/leetcode/3301-3400/3365.Rearrange-K-Substrings-to-Form-Target-String/README.md @@ -0,0 +1,32 @@ +# [3365.Rearrange K Substrings to Form Target String][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Rearrange K Substrings to Form Target String +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/rearrange-k-substrings-to-form-target-string/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3365.Rearrange-K-Substrings-to-Form-Target-String/Solution.go b/leetcode/3301-3400/3365.Rearrange-K-Substrings-to-Form-Target-String/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3365.Rearrange-K-Substrings-to-Form-Target-String/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3365.Rearrange-K-Substrings-to-Form-Target-String/Solution_test.go b/leetcode/3301-3400/3365.Rearrange-K-Substrings-to-Form-Target-String/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3365.Rearrange-K-Substrings-to-Form-Target-String/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3366.Minimum-Array-Sum/README.md b/leetcode/3301-3400/3366.Minimum-Array-Sum/README.md new file mode 100755 index 000000000..eb086fea5 --- /dev/null +++ b/leetcode/3301-3400/3366.Minimum-Array-Sum/README.md @@ -0,0 +1,32 @@ +# [3366.Minimum Array Sum][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Minimum Array Sum +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/minimum-array-sum/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3366.Minimum-Array-Sum/Solution.go b/leetcode/3301-3400/3366.Minimum-Array-Sum/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3366.Minimum-Array-Sum/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3366.Minimum-Array-Sum/Solution_test.go b/leetcode/3301-3400/3366.Minimum-Array-Sum/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3366.Minimum-Array-Sum/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3367.Maximize-Sum-of-Weights-after-Edge-Removals/README.md b/leetcode/3301-3400/3367.Maximize-Sum-of-Weights-after-Edge-Removals/README.md new file mode 100755 index 000000000..bf1248f1f --- /dev/null +++ b/leetcode/3301-3400/3367.Maximize-Sum-of-Weights-after-Edge-Removals/README.md @@ -0,0 +1,32 @@ +# [3367.Maximize Sum of Weights after Edge Removals][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Maximize Sum of Weights after Edge Removals +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximize-sum-of-weights-after-edge-removals/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3367.Maximize-Sum-of-Weights-after-Edge-Removals/Solution.go b/leetcode/3301-3400/3367.Maximize-Sum-of-Weights-after-Edge-Removals/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3367.Maximize-Sum-of-Weights-after-Edge-Removals/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3367.Maximize-Sum-of-Weights-after-Edge-Removals/Solution_test.go b/leetcode/3301-3400/3367.Maximize-Sum-of-Weights-after-Edge-Removals/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3367.Maximize-Sum-of-Weights-after-Edge-Removals/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3370.Smallest-Number-With-All-Set-Bits/README.md b/leetcode/3301-3400/3370.Smallest-Number-With-All-Set-Bits/README.md new file mode 100755 index 000000000..5035313d8 --- /dev/null +++ b/leetcode/3301-3400/3370.Smallest-Number-With-All-Set-Bits/README.md @@ -0,0 +1,32 @@ +# [3370.Smallest Number With All Set Bits][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Smallest Number With All Set Bits +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/smallest-number-with-all-set-bits/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3370.Smallest-Number-With-All-Set-Bits/Solution.go b/leetcode/3301-3400/3370.Smallest-Number-With-All-Set-Bits/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3370.Smallest-Number-With-All-Set-Bits/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3370.Smallest-Number-With-All-Set-Bits/Solution_test.go b/leetcode/3301-3400/3370.Smallest-Number-With-All-Set-Bits/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3370.Smallest-Number-With-All-Set-Bits/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3371.Identify-the-Largest-Outlier-in-an-Array/README.md b/leetcode/3301-3400/3371.Identify-the-Largest-Outlier-in-an-Array/README.md new file mode 100755 index 000000000..c4712022a --- /dev/null +++ b/leetcode/3301-3400/3371.Identify-the-Largest-Outlier-in-an-Array/README.md @@ -0,0 +1,32 @@ +# [3371.Identify the Largest Outlier in an Array][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Identify the Largest Outlier in an Array +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/identify-the-largest-outlier-in-an-array/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3371.Identify-the-Largest-Outlier-in-an-Array/Solution.go b/leetcode/3301-3400/3371.Identify-the-Largest-Outlier-in-an-Array/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3371.Identify-the-Largest-Outlier-in-an-Array/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3371.Identify-the-Largest-Outlier-in-an-Array/Solution_test.go b/leetcode/3301-3400/3371.Identify-the-Largest-Outlier-in-an-Array/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3371.Identify-the-Largest-Outlier-in-an-Array/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3372.Maximize-the-Number-of-Target-Nodes-After-Connecting-Trees-I/README.md b/leetcode/3301-3400/3372.Maximize-the-Number-of-Target-Nodes-After-Connecting-Trees-I/README.md new file mode 100755 index 000000000..ec9b58f67 --- /dev/null +++ b/leetcode/3301-3400/3372.Maximize-the-Number-of-Target-Nodes-After-Connecting-Trees-I/README.md @@ -0,0 +1,32 @@ +# [3372.Maximize the Number of Target Nodes After Connecting Trees I][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Maximize the Number of Target Nodes After Connecting Trees I +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximize-the-number-of-target-nodes-after-connecting-trees-i/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3372.Maximize-the-Number-of-Target-Nodes-After-Connecting-Trees-I/Solution.go b/leetcode/3301-3400/3372.Maximize-the-Number-of-Target-Nodes-After-Connecting-Trees-I/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3372.Maximize-the-Number-of-Target-Nodes-After-Connecting-Trees-I/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3372.Maximize-the-Number-of-Target-Nodes-After-Connecting-Trees-I/Solution_test.go b/leetcode/3301-3400/3372.Maximize-the-Number-of-Target-Nodes-After-Connecting-Trees-I/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3372.Maximize-the-Number-of-Target-Nodes-After-Connecting-Trees-I/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3373.Maximize-the-Number-of-Target-Nodes-After-Connecting-Trees-II/README.md b/leetcode/3301-3400/3373.Maximize-the-Number-of-Target-Nodes-After-Connecting-Trees-II/README.md new file mode 100755 index 000000000..0a59acd4c --- /dev/null +++ b/leetcode/3301-3400/3373.Maximize-the-Number-of-Target-Nodes-After-Connecting-Trees-II/README.md @@ -0,0 +1,32 @@ +# [3373.Maximize the Number of Target Nodes After Connecting Trees II][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Maximize the Number of Target Nodes After Connecting Trees II +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximize-the-number-of-target-nodes-after-connecting-trees-ii/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3373.Maximize-the-Number-of-Target-Nodes-After-Connecting-Trees-II/Solution.go b/leetcode/3301-3400/3373.Maximize-the-Number-of-Target-Nodes-After-Connecting-Trees-II/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3373.Maximize-the-Number-of-Target-Nodes-After-Connecting-Trees-II/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3373.Maximize-the-Number-of-Target-Nodes-After-Connecting-Trees-II/Solution_test.go b/leetcode/3301-3400/3373.Maximize-the-Number-of-Target-Nodes-After-Connecting-Trees-II/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3373.Maximize-the-Number-of-Target-Nodes-After-Connecting-Trees-II/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3375.Minimum-Operations-to-Make-Array-Values-Equal-to-K/README.md b/leetcode/3301-3400/3375.Minimum-Operations-to-Make-Array-Values-Equal-to-K/README.md new file mode 100755 index 000000000..4e08aefda --- /dev/null +++ b/leetcode/3301-3400/3375.Minimum-Operations-to-Make-Array-Values-Equal-to-K/README.md @@ -0,0 +1,32 @@ +# [3375.Minimum Operations to Make Array Values Equal to K][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Minimum Operations to Make Array Values Equal to K +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/minimum-operations-to-make-array-values-equal-to-k/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3375.Minimum-Operations-to-Make-Array-Values-Equal-to-K/Solution.go b/leetcode/3301-3400/3375.Minimum-Operations-to-Make-Array-Values-Equal-to-K/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3375.Minimum-Operations-to-Make-Array-Values-Equal-to-K/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3375.Minimum-Operations-to-Make-Array-Values-Equal-to-K/Solution_test.go b/leetcode/3301-3400/3375.Minimum-Operations-to-Make-Array-Values-Equal-to-K/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3375.Minimum-Operations-to-Make-Array-Values-Equal-to-K/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3376.Minimum-Time-to-Break-Locks-I/README.md b/leetcode/3301-3400/3376.Minimum-Time-to-Break-Locks-I/README.md new file mode 100755 index 000000000..8ebae9b00 --- /dev/null +++ b/leetcode/3301-3400/3376.Minimum-Time-to-Break-Locks-I/README.md @@ -0,0 +1,32 @@ +# [3376.Minimum Time to Break Locks I][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Minimum Time to Break Locks I +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/minimum-time-to-break-locks-i/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3376.Minimum-Time-to-Break-Locks-I/Solution.go b/leetcode/3301-3400/3376.Minimum-Time-to-Break-Locks-I/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3376.Minimum-Time-to-Break-Locks-I/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3376.Minimum-Time-to-Break-Locks-I/Solution_test.go b/leetcode/3301-3400/3376.Minimum-Time-to-Break-Locks-I/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3376.Minimum-Time-to-Break-Locks-I/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3377.Digit-Operations-to-Make-Two-Integers-Equal/README.md b/leetcode/3301-3400/3377.Digit-Operations-to-Make-Two-Integers-Equal/README.md new file mode 100755 index 000000000..28c017d8d --- /dev/null +++ b/leetcode/3301-3400/3377.Digit-Operations-to-Make-Two-Integers-Equal/README.md @@ -0,0 +1,32 @@ +# [3377.Digit Operations to Make Two Integers Equal][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Digit Operations to Make Two Integers Equal +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/digit-operations-to-make-two-integers-equal/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3377.Digit-Operations-to-Make-Two-Integers-Equal/Solution.go b/leetcode/3301-3400/3377.Digit-Operations-to-Make-Two-Integers-Equal/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3377.Digit-Operations-to-Make-Two-Integers-Equal/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3377.Digit-Operations-to-Make-Two-Integers-Equal/Solution_test.go b/leetcode/3301-3400/3377.Digit-Operations-to-Make-Two-Integers-Equal/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3377.Digit-Operations-to-Make-Two-Integers-Equal/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3378.Count-Connected-Components-in-LCM-Graph/README.md b/leetcode/3301-3400/3378.Count-Connected-Components-in-LCM-Graph/README.md new file mode 100755 index 000000000..90b43eb73 --- /dev/null +++ b/leetcode/3301-3400/3378.Count-Connected-Components-in-LCM-Graph/README.md @@ -0,0 +1,32 @@ +# [3378.Count Connected Components in LCM Graph][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Count Connected Components in LCM Graph +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/count-connected-components-in-lcm-graph/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3378.Count-Connected-Components-in-LCM-Graph/Solution.go b/leetcode/3301-3400/3378.Count-Connected-Components-in-LCM-Graph/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3378.Count-Connected-Components-in-LCM-Graph/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3378.Count-Connected-Components-in-LCM-Graph/Solution_test.go b/leetcode/3301-3400/3378.Count-Connected-Components-in-LCM-Graph/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3378.Count-Connected-Components-in-LCM-Graph/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3379.Transformed-Array/README.md b/leetcode/3301-3400/3379.Transformed-Array/README.md new file mode 100755 index 000000000..11095a992 --- /dev/null +++ b/leetcode/3301-3400/3379.Transformed-Array/README.md @@ -0,0 +1,32 @@ +# [3379.Transformed Array][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Transformed Array +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/transformed-array/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3379.Transformed-Array/Solution.go b/leetcode/3301-3400/3379.Transformed-Array/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3379.Transformed-Array/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3379.Transformed-Array/Solution_test.go b/leetcode/3301-3400/3379.Transformed-Array/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3379.Transformed-Array/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3380.Maximum-Area-Rectangle-With-Point-Constraints-I/README.md b/leetcode/3301-3400/3380.Maximum-Area-Rectangle-With-Point-Constraints-I/README.md new file mode 100755 index 000000000..6fc6b26e2 --- /dev/null +++ b/leetcode/3301-3400/3380.Maximum-Area-Rectangle-With-Point-Constraints-I/README.md @@ -0,0 +1,32 @@ +# [3380.Maximum Area Rectangle With Point Constraints I][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Maximum Area Rectangle With Point Constraints I +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximum-area-rectangle-with-point-constraints-i/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3380.Maximum-Area-Rectangle-With-Point-Constraints-I/Solution.go b/leetcode/3301-3400/3380.Maximum-Area-Rectangle-With-Point-Constraints-I/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3380.Maximum-Area-Rectangle-With-Point-Constraints-I/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3380.Maximum-Area-Rectangle-With-Point-Constraints-I/Solution_test.go b/leetcode/3301-3400/3380.Maximum-Area-Rectangle-With-Point-Constraints-I/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3380.Maximum-Area-Rectangle-With-Point-Constraints-I/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3381.Maximum-Subarray-Sum-With-Length-Divisible-by-K/README.md b/leetcode/3301-3400/3381.Maximum-Subarray-Sum-With-Length-Divisible-by-K/README.md new file mode 100755 index 000000000..65f0edc1e --- /dev/null +++ b/leetcode/3301-3400/3381.Maximum-Subarray-Sum-With-Length-Divisible-by-K/README.md @@ -0,0 +1,32 @@ +# [3381.Maximum Subarray Sum With Length Divisible by K][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Maximum Subarray Sum With Length Divisible by K +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximum-subarray-sum-with-length-divisible-by-k/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3381.Maximum-Subarray-Sum-With-Length-Divisible-by-K/Solution.go b/leetcode/3301-3400/3381.Maximum-Subarray-Sum-With-Length-Divisible-by-K/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3381.Maximum-Subarray-Sum-With-Length-Divisible-by-K/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3381.Maximum-Subarray-Sum-With-Length-Divisible-by-K/Solution_test.go b/leetcode/3301-3400/3381.Maximum-Subarray-Sum-With-Length-Divisible-by-K/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3381.Maximum-Subarray-Sum-With-Length-Divisible-by-K/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3382.Maximum-Area-Rectangle-With-Point-Constraints-II/README.md b/leetcode/3301-3400/3382.Maximum-Area-Rectangle-With-Point-Constraints-II/README.md new file mode 100755 index 000000000..da4eae100 --- /dev/null +++ b/leetcode/3301-3400/3382.Maximum-Area-Rectangle-With-Point-Constraints-II/README.md @@ -0,0 +1,32 @@ +# [3382.Maximum Area Rectangle With Point Constraints II][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Maximum Area Rectangle With Point Constraints II +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximum-area-rectangle-with-point-constraints-ii/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3382.Maximum-Area-Rectangle-With-Point-Constraints-II/Solution.go b/leetcode/3301-3400/3382.Maximum-Area-Rectangle-With-Point-Constraints-II/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3382.Maximum-Area-Rectangle-With-Point-Constraints-II/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3382.Maximum-Area-Rectangle-With-Point-Constraints-II/Solution_test.go b/leetcode/3301-3400/3382.Maximum-Area-Rectangle-With-Point-Constraints-II/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3382.Maximum-Area-Rectangle-With-Point-Constraints-II/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3386.Button-with-Longest-Push-Time/README.md b/leetcode/3301-3400/3386.Button-with-Longest-Push-Time/README.md new file mode 100755 index 000000000..0a4a748a3 --- /dev/null +++ b/leetcode/3301-3400/3386.Button-with-Longest-Push-Time/README.md @@ -0,0 +1,32 @@ +# [3386.Button with Longest Push Time][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Button with Longest Push Time +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/button-with-longest-push-time/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3386.Button-with-Longest-Push-Time/Solution.go b/leetcode/3301-3400/3386.Button-with-Longest-Push-Time/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3386.Button-with-Longest-Push-Time/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3386.Button-with-Longest-Push-Time/Solution_test.go b/leetcode/3301-3400/3386.Button-with-Longest-Push-Time/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3386.Button-with-Longest-Push-Time/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3387.Maximize-Amount-After-Two-Days-of-Conversions/README.md b/leetcode/3301-3400/3387.Maximize-Amount-After-Two-Days-of-Conversions/README.md new file mode 100755 index 000000000..536cb7d77 --- /dev/null +++ b/leetcode/3301-3400/3387.Maximize-Amount-After-Two-Days-of-Conversions/README.md @@ -0,0 +1,32 @@ +# [3387.Maximize Amount After Two Days of Conversions][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Maximize Amount After Two Days of Conversions +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximize-amount-after-two-days-of-conversions/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3387.Maximize-Amount-After-Two-Days-of-Conversions/Solution.go b/leetcode/3301-3400/3387.Maximize-Amount-After-Two-Days-of-Conversions/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3387.Maximize-Amount-After-Two-Days-of-Conversions/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3387.Maximize-Amount-After-Two-Days-of-Conversions/Solution_test.go b/leetcode/3301-3400/3387.Maximize-Amount-After-Two-Days-of-Conversions/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3387.Maximize-Amount-After-Two-Days-of-Conversions/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3388.Count-Beautiful-Splits-in-an-Array/README.md b/leetcode/3301-3400/3388.Count-Beautiful-Splits-in-an-Array/README.md new file mode 100755 index 000000000..b6d3b8508 --- /dev/null +++ b/leetcode/3301-3400/3388.Count-Beautiful-Splits-in-an-Array/README.md @@ -0,0 +1,32 @@ +# [3388.Count Beautiful Splits in an Array][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Count Beautiful Splits in an Array +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/count-beautiful-splits-in-an-array/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3388.Count-Beautiful-Splits-in-an-Array/Solution.go b/leetcode/3301-3400/3388.Count-Beautiful-Splits-in-an-Array/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3388.Count-Beautiful-Splits-in-an-Array/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3388.Count-Beautiful-Splits-in-an-Array/Solution_test.go b/leetcode/3301-3400/3388.Count-Beautiful-Splits-in-an-Array/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3388.Count-Beautiful-Splits-in-an-Array/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3389.Minimum-Operations-to-Make-Character-Frequencies-Equal/README.md b/leetcode/3301-3400/3389.Minimum-Operations-to-Make-Character-Frequencies-Equal/README.md new file mode 100755 index 000000000..8817d6601 --- /dev/null +++ b/leetcode/3301-3400/3389.Minimum-Operations-to-Make-Character-Frequencies-Equal/README.md @@ -0,0 +1,32 @@ +# [3389.Minimum Operations to Make Character Frequencies Equal][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Minimum Operations to Make Character Frequencies Equal +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/minimum-operations-to-make-character-frequencies-equal/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3389.Minimum-Operations-to-Make-Character-Frequencies-Equal/Solution.go b/leetcode/3301-3400/3389.Minimum-Operations-to-Make-Character-Frequencies-Equal/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3389.Minimum-Operations-to-Make-Character-Frequencies-Equal/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3389.Minimum-Operations-to-Make-Character-Frequencies-Equal/Solution_test.go b/leetcode/3301-3400/3389.Minimum-Operations-to-Make-Character-Frequencies-Equal/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3389.Minimum-Operations-to-Make-Character-Frequencies-Equal/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3392.Count-Subarrays-of-Length-Three-With-a-Condition/README.md b/leetcode/3301-3400/3392.Count-Subarrays-of-Length-Three-With-a-Condition/README.md new file mode 100755 index 000000000..c4ee87319 --- /dev/null +++ b/leetcode/3301-3400/3392.Count-Subarrays-of-Length-Three-With-a-Condition/README.md @@ -0,0 +1,32 @@ +# [3392.Count Subarrays of Length Three With a Condition][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Count Subarrays of Length Three With a Condition +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/count-subarrays-of-length-three-with-a-condition/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3392.Count-Subarrays-of-Length-Three-With-a-Condition/Solution.go b/leetcode/3301-3400/3392.Count-Subarrays-of-Length-Three-With-a-Condition/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3392.Count-Subarrays-of-Length-Three-With-a-Condition/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3392.Count-Subarrays-of-Length-Three-With-a-Condition/Solution_test.go b/leetcode/3301-3400/3392.Count-Subarrays-of-Length-Three-With-a-Condition/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3392.Count-Subarrays-of-Length-Three-With-a-Condition/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3393.Count-Paths-With-the-Given-XOR-Value/README.md b/leetcode/3301-3400/3393.Count-Paths-With-the-Given-XOR-Value/README.md new file mode 100755 index 000000000..ee6e0e6c2 --- /dev/null +++ b/leetcode/3301-3400/3393.Count-Paths-With-the-Given-XOR-Value/README.md @@ -0,0 +1,32 @@ +# [3393.Count Paths With the Given XOR Value][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Count Paths With the Given XOR Value +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/count-paths-with-the-given-xor-value/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3393.Count-Paths-With-the-Given-XOR-Value/Solution.go b/leetcode/3301-3400/3393.Count-Paths-With-the-Given-XOR-Value/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3393.Count-Paths-With-the-Given-XOR-Value/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3393.Count-Paths-With-the-Given-XOR-Value/Solution_test.go b/leetcode/3301-3400/3393.Count-Paths-With-the-Given-XOR-Value/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3393.Count-Paths-With-the-Given-XOR-Value/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3394.Check-if-Grid-can-be-Cut-into-Sections/README.md b/leetcode/3301-3400/3394.Check-if-Grid-can-be-Cut-into-Sections/README.md new file mode 100755 index 000000000..4e2deeff2 --- /dev/null +++ b/leetcode/3301-3400/3394.Check-if-Grid-can-be-Cut-into-Sections/README.md @@ -0,0 +1,32 @@ +# [3394.Check if Grid can be Cut into Sections][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Check if Grid can be Cut into Sections +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/check-if-grid-can-be-cut-into-sections/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3394.Check-if-Grid-can-be-Cut-into-Sections/Solution.go b/leetcode/3301-3400/3394.Check-if-Grid-can-be-Cut-into-Sections/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3394.Check-if-Grid-can-be-Cut-into-Sections/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3394.Check-if-Grid-can-be-Cut-into-Sections/Solution_test.go b/leetcode/3301-3400/3394.Check-if-Grid-can-be-Cut-into-Sections/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3394.Check-if-Grid-can-be-Cut-into-Sections/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3395.Subsequences-with-a-Unique-Middle-Mode-I/README.md b/leetcode/3301-3400/3395.Subsequences-with-a-Unique-Middle-Mode-I/README.md new file mode 100755 index 000000000..5b7a9ee14 --- /dev/null +++ b/leetcode/3301-3400/3395.Subsequences-with-a-Unique-Middle-Mode-I/README.md @@ -0,0 +1,32 @@ +# [3395.Subsequences with a Unique Middle Mode I][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Subsequences with a Unique Middle Mode I +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/subsequences-with-a-unique-middle-mode-i/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3395.Subsequences-with-a-Unique-Middle-Mode-I/Solution.go b/leetcode/3301-3400/3395.Subsequences-with-a-Unique-Middle-Mode-I/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3395.Subsequences-with-a-Unique-Middle-Mode-I/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3395.Subsequences-with-a-Unique-Middle-Mode-I/Solution_test.go b/leetcode/3301-3400/3395.Subsequences-with-a-Unique-Middle-Mode-I/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3395.Subsequences-with-a-Unique-Middle-Mode-I/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3396.Minimum-Number-of-Operations-to-Make-Elements-in-Array-Distinct/README.md b/leetcode/3301-3400/3396.Minimum-Number-of-Operations-to-Make-Elements-in-Array-Distinct/README.md new file mode 100755 index 000000000..9a137df67 --- /dev/null +++ b/leetcode/3301-3400/3396.Minimum-Number-of-Operations-to-Make-Elements-in-Array-Distinct/README.md @@ -0,0 +1,32 @@ +# [3396.Minimum Number of Operations to Make Elements in Array Distinct][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Minimum Number of Operations to Make Elements in Array Distinct +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/minimum-number-of-operations-to-make-elements-in-array-distinct/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3396.Minimum-Number-of-Operations-to-Make-Elements-in-Array-Distinct/Solution.go b/leetcode/3301-3400/3396.Minimum-Number-of-Operations-to-Make-Elements-in-Array-Distinct/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3396.Minimum-Number-of-Operations-to-Make-Elements-in-Array-Distinct/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3396.Minimum-Number-of-Operations-to-Make-Elements-in-Array-Distinct/Solution_test.go b/leetcode/3301-3400/3396.Minimum-Number-of-Operations-to-Make-Elements-in-Array-Distinct/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3396.Minimum-Number-of-Operations-to-Make-Elements-in-Array-Distinct/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3397.Maximum-Number-of-Distinct-Elements-After-Operations/README.md b/leetcode/3301-3400/3397.Maximum-Number-of-Distinct-Elements-After-Operations/README.md new file mode 100755 index 000000000..2f32e8de5 --- /dev/null +++ b/leetcode/3301-3400/3397.Maximum-Number-of-Distinct-Elements-After-Operations/README.md @@ -0,0 +1,32 @@ +# [3397.Maximum Number of Distinct Elements After Operations][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Maximum Number of Distinct Elements After Operations +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximum-number-of-distinct-elements-after-operations/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3397.Maximum-Number-of-Distinct-Elements-After-Operations/Solution.go b/leetcode/3301-3400/3397.Maximum-Number-of-Distinct-Elements-After-Operations/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3397.Maximum-Number-of-Distinct-Elements-After-Operations/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3397.Maximum-Number-of-Distinct-Elements-After-Operations/Solution_test.go b/leetcode/3301-3400/3397.Maximum-Number-of-Distinct-Elements-After-Operations/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3397.Maximum-Number-of-Distinct-Elements-After-Operations/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3398.Smallest-Substring-With-Identical-Characters-I/README.md b/leetcode/3301-3400/3398.Smallest-Substring-With-Identical-Characters-I/README.md new file mode 100755 index 000000000..d0c06b2dd --- /dev/null +++ b/leetcode/3301-3400/3398.Smallest-Substring-With-Identical-Characters-I/README.md @@ -0,0 +1,32 @@ +# [3398.Smallest Substring With Identical Characters I][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Smallest Substring With Identical Characters I +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/smallest-substring-with-identical-characters-i/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3398.Smallest-Substring-With-Identical-Characters-I/Solution.go b/leetcode/3301-3400/3398.Smallest-Substring-With-Identical-Characters-I/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3398.Smallest-Substring-With-Identical-Characters-I/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3398.Smallest-Substring-With-Identical-Characters-I/Solution_test.go b/leetcode/3301-3400/3398.Smallest-Substring-With-Identical-Characters-I/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3398.Smallest-Substring-With-Identical-Characters-I/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3301-3400/3399.Smallest-Substring-With-Identical-Characters-II/README.md b/leetcode/3301-3400/3399.Smallest-Substring-With-Identical-Characters-II/README.md new file mode 100755 index 000000000..28bcae4f7 --- /dev/null +++ b/leetcode/3301-3400/3399.Smallest-Substring-With-Identical-Characters-II/README.md @@ -0,0 +1,32 @@ +# [3399.Smallest Substring With Identical Characters II][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Smallest Substring With Identical Characters II +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/smallest-substring-with-identical-characters-ii/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3301-3400/3399.Smallest-Substring-With-Identical-Characters-II/Solution.go b/leetcode/3301-3400/3399.Smallest-Substring-With-Identical-Characters-II/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3301-3400/3399.Smallest-Substring-With-Identical-Characters-II/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3301-3400/3399.Smallest-Substring-With-Identical-Characters-II/Solution_test.go b/leetcode/3301-3400/3399.Smallest-Substring-With-Identical-Characters-II/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3301-3400/3399.Smallest-Substring-With-Identical-Characters-II/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +}