From 224d828bcf9150e2b452e5f8284b88569cdb236e Mon Sep 17 00:00:00 2001 From: 0xff-dev Date: Tue, 10 Jun 2025 08:59:35 +0800 Subject: [PATCH] 3401-3500 problems --- cmd/main.go | 3 +- .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../3404.Count-Special-Subsequences/README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../3407.Substring-Matching-Pattern/README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../3408.Design-Task-Manager/README.md | 32 +++++++++++++++ .../3408.Design-Task-Manager/Solution.go | 5 +++ .../3408.Design-Task-Manager/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 +++++++++++++++++++ .../3425.Longest-Special-Path/README.md | 32 +++++++++++++++ .../3425.Longest-Special-Path/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 +++++++++++++++++++ .../3401-3500/3429.Paint-House-IV/README.md | 32 +++++++++++++++ .../3401-3500/3429.Paint-House-IV/Solution.go | 5 +++ .../3429.Paint-House-IV/Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../3433.Count-Mentions-Per-User/README.md | 32 +++++++++++++++ .../3433.Count-Mentions-Per-User/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 +++++++++++++++++++ .../3441.Minimum-Cost-Good-Caption/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 +++++++++++++++++++ .../3446.Sort-Matrix-by-Diagonals/README.md | 32 +++++++++++++++ .../3446.Sort-Matrix-by-Diagonals/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 +++++++++++++++++++ .../3452.Sum-of-Good-Numbers/README.md | 32 +++++++++++++++ .../3452.Sum-of-Good-Numbers/Solution.go | 5 +++ .../3452.Sum-of-Good-Numbers/Solution_test.go | 39 +++++++++++++++++++ .../3453.Separate-Squares-I/README.md | 32 +++++++++++++++ .../3453.Separate-Squares-I/Solution.go | 5 +++ .../3453.Separate-Squares-I/Solution_test.go | 39 +++++++++++++++++++ .../3454.Separate-Squares-II/README.md | 32 +++++++++++++++ .../3454.Separate-Squares-II/Solution.go | 5 +++ .../3454.Separate-Squares-II/Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ leetcode/3401-3500/3457.Eat-Pizzas!/README.md | 32 +++++++++++++++ .../3401-3500/3457.Eat-Pizzas!/Solution.go | 5 +++ .../3457.Eat-Pizzas!/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 +++++++++++++++++++ .../3467.Transform-Array-by-Parity/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 +++++++++++++++++++ .../3401-3500/3470.Permutations-IV/README.md | 32 +++++++++++++++ .../3470.Permutations-IV/Solution.go | 5 +++ .../3470.Permutations-IV/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 +++++++++++++++++++ .../3477.Fruits-Into-Baskets-II/README.md | 32 +++++++++++++++ .../3477.Fruits-Into-Baskets-II/Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../3479.Fruits-Into-Baskets-III/README.md | 32 +++++++++++++++ .../3479.Fruits-Into-Baskets-III/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 +++++++++++++++++++ .../3484.Design-Spreadsheet/README.md | 32 +++++++++++++++ .../3484.Design-Spreadsheet/Solution.go | 5 +++ .../3484.Design-Spreadsheet/Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../3486.Longest-Special-Path-II/README.md | 32 +++++++++++++++ .../3486.Longest-Special-Path-II/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 +++++++++++++++++++ .../3490.Count-Beautiful-Numbers/README.md | 32 +++++++++++++++ .../3490.Count-Beautiful-Numbers/Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../3401-3500/3493.Properties-Graph/README.md | 32 +++++++++++++++ .../3493.Properties-Graph/Solution.go | 5 +++ .../3493.Properties-Graph/Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../README.md | 32 +++++++++++++++ .../Solution.go | 5 +++ .../Solution_test.go | 39 +++++++++++++++++++ .../3498.Reverse-Degree-of-a-String/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, 6006 insertions(+), 1 deletion(-) create mode 100755 leetcode/3401-3500/3402.Minimum-Operations-to-Make-Columns-Strictly-Increasing/README.md create mode 100644 leetcode/3401-3500/3402.Minimum-Operations-to-Make-Columns-Strictly-Increasing/Solution.go create mode 100644 leetcode/3401-3500/3402.Minimum-Operations-to-Make-Columns-Strictly-Increasing/Solution_test.go create mode 100755 leetcode/3401-3500/3403.Find-the-Lexicographically-Largest-String-From-the-Box-I/README.md create mode 100644 leetcode/3401-3500/3403.Find-the-Lexicographically-Largest-String-From-the-Box-I/Solution.go create mode 100644 leetcode/3401-3500/3403.Find-the-Lexicographically-Largest-String-From-the-Box-I/Solution_test.go create mode 100755 leetcode/3401-3500/3404.Count-Special-Subsequences/README.md create mode 100644 leetcode/3401-3500/3404.Count-Special-Subsequences/Solution.go create mode 100644 leetcode/3401-3500/3404.Count-Special-Subsequences/Solution_test.go create mode 100755 leetcode/3401-3500/3405.Count-the-Number-of-Arrays-with-K-Matching-Adjacent-Elements/README.md create mode 100644 leetcode/3401-3500/3405.Count-the-Number-of-Arrays-with-K-Matching-Adjacent-Elements/Solution.go create mode 100644 leetcode/3401-3500/3405.Count-the-Number-of-Arrays-with-K-Matching-Adjacent-Elements/Solution_test.go create mode 100755 leetcode/3401-3500/3407.Substring-Matching-Pattern/README.md create mode 100644 leetcode/3401-3500/3407.Substring-Matching-Pattern/Solution.go create mode 100644 leetcode/3401-3500/3407.Substring-Matching-Pattern/Solution_test.go create mode 100755 leetcode/3401-3500/3408.Design-Task-Manager/README.md create mode 100644 leetcode/3401-3500/3408.Design-Task-Manager/Solution.go create mode 100644 leetcode/3401-3500/3408.Design-Task-Manager/Solution_test.go create mode 100755 leetcode/3401-3500/3409.Longest-Subsequence-With-Decreasing-Adjacent-Difference/README.md create mode 100644 leetcode/3401-3500/3409.Longest-Subsequence-With-Decreasing-Adjacent-Difference/Solution.go create mode 100644 leetcode/3401-3500/3409.Longest-Subsequence-With-Decreasing-Adjacent-Difference/Solution_test.go create mode 100755 leetcode/3401-3500/3410.Maximize-Subarray-Sum-After-Removing-All-Occurrences-of-One-Element/README.md create mode 100644 leetcode/3401-3500/3410.Maximize-Subarray-Sum-After-Removing-All-Occurrences-of-One-Element/Solution.go create mode 100644 leetcode/3401-3500/3410.Maximize-Subarray-Sum-After-Removing-All-Occurrences-of-One-Element/Solution_test.go create mode 100755 leetcode/3401-3500/3411.Maximum-Subarray-With-Equal-Products/README.md create mode 100644 leetcode/3401-3500/3411.Maximum-Subarray-With-Equal-Products/Solution.go create mode 100644 leetcode/3401-3500/3411.Maximum-Subarray-With-Equal-Products/Solution_test.go create mode 100755 leetcode/3401-3500/3412.Find-Mirror-Score-of-a-String/README.md create mode 100644 leetcode/3401-3500/3412.Find-Mirror-Score-of-a-String/Solution.go create mode 100644 leetcode/3401-3500/3412.Find-Mirror-Score-of-a-String/Solution_test.go create mode 100755 leetcode/3401-3500/3413.Maximum-Coins-From-K-Consecutive-Bags/README.md create mode 100644 leetcode/3401-3500/3413.Maximum-Coins-From-K-Consecutive-Bags/Solution.go create mode 100644 leetcode/3401-3500/3413.Maximum-Coins-From-K-Consecutive-Bags/Solution_test.go create mode 100755 leetcode/3401-3500/3414.Maximum-Score-of-Non-overlapping-Intervals/README.md create mode 100644 leetcode/3401-3500/3414.Maximum-Score-of-Non-overlapping-Intervals/Solution.go create mode 100644 leetcode/3401-3500/3414.Maximum-Score-of-Non-overlapping-Intervals/Solution_test.go create mode 100755 leetcode/3401-3500/3417.Zigzag-Grid-Traversal-With-Skip/README.md create mode 100644 leetcode/3401-3500/3417.Zigzag-Grid-Traversal-With-Skip/Solution.go create mode 100644 leetcode/3401-3500/3417.Zigzag-Grid-Traversal-With-Skip/Solution_test.go create mode 100755 leetcode/3401-3500/3418.Maximum-Amount-of-Money-Robot-Can-Earn/README.md create mode 100644 leetcode/3401-3500/3418.Maximum-Amount-of-Money-Robot-Can-Earn/Solution.go create mode 100644 leetcode/3401-3500/3418.Maximum-Amount-of-Money-Robot-Can-Earn/Solution_test.go create mode 100755 leetcode/3401-3500/3419.Minimize-the-Maximum-Edge-Weight-of-Graph/README.md create mode 100644 leetcode/3401-3500/3419.Minimize-the-Maximum-Edge-Weight-of-Graph/Solution.go create mode 100644 leetcode/3401-3500/3419.Minimize-the-Maximum-Edge-Weight-of-Graph/Solution_test.go create mode 100755 leetcode/3401-3500/3420.Count-Non-Decreasing-Subarrays-After-K-Operations/README.md create mode 100644 leetcode/3401-3500/3420.Count-Non-Decreasing-Subarrays-After-K-Operations/Solution.go create mode 100644 leetcode/3401-3500/3420.Count-Non-Decreasing-Subarrays-After-K-Operations/Solution_test.go create mode 100755 leetcode/3401-3500/3423.Maximum-Difference-Between-Adjacent-Elements-in-a-Circular-Array/README.md create mode 100644 leetcode/3401-3500/3423.Maximum-Difference-Between-Adjacent-Elements-in-a-Circular-Array/Solution.go create mode 100644 leetcode/3401-3500/3423.Maximum-Difference-Between-Adjacent-Elements-in-a-Circular-Array/Solution_test.go create mode 100755 leetcode/3401-3500/3424.Minimum-Cost-to-Make-Arrays-Identical/README.md create mode 100644 leetcode/3401-3500/3424.Minimum-Cost-to-Make-Arrays-Identical/Solution.go create mode 100644 leetcode/3401-3500/3424.Minimum-Cost-to-Make-Arrays-Identical/Solution_test.go create mode 100755 leetcode/3401-3500/3425.Longest-Special-Path/README.md create mode 100644 leetcode/3401-3500/3425.Longest-Special-Path/Solution.go create mode 100644 leetcode/3401-3500/3425.Longest-Special-Path/Solution_test.go create mode 100755 leetcode/3401-3500/3426.Manhattan-Distances-of-All-Arrangements-of-Pieces/README.md create mode 100644 leetcode/3401-3500/3426.Manhattan-Distances-of-All-Arrangements-of-Pieces/Solution.go create mode 100644 leetcode/3401-3500/3426.Manhattan-Distances-of-All-Arrangements-of-Pieces/Solution_test.go create mode 100755 leetcode/3401-3500/3427.Sum-of-Variable-Length-Subarrays/README.md create mode 100644 leetcode/3401-3500/3427.Sum-of-Variable-Length-Subarrays/Solution.go create mode 100644 leetcode/3401-3500/3427.Sum-of-Variable-Length-Subarrays/Solution_test.go create mode 100755 leetcode/3401-3500/3428.Maximum-and-Minimum-Sums-of-at-Most-Size-K-Subsequences/README.md create mode 100644 leetcode/3401-3500/3428.Maximum-and-Minimum-Sums-of-at-Most-Size-K-Subsequences/Solution.go create mode 100644 leetcode/3401-3500/3428.Maximum-and-Minimum-Sums-of-at-Most-Size-K-Subsequences/Solution_test.go create mode 100755 leetcode/3401-3500/3429.Paint-House-IV/README.md create mode 100644 leetcode/3401-3500/3429.Paint-House-IV/Solution.go create mode 100644 leetcode/3401-3500/3429.Paint-House-IV/Solution_test.go create mode 100755 leetcode/3401-3500/3430.Maximum-and-Minimum-Sums-of-at-Most-Size-K-Subarrays/README.md create mode 100644 leetcode/3401-3500/3430.Maximum-and-Minimum-Sums-of-at-Most-Size-K-Subarrays/Solution.go create mode 100644 leetcode/3401-3500/3430.Maximum-and-Minimum-Sums-of-at-Most-Size-K-Subarrays/Solution_test.go create mode 100755 leetcode/3401-3500/3432.Count-Partitions-with-Even-Sum-Difference/README.md create mode 100644 leetcode/3401-3500/3432.Count-Partitions-with-Even-Sum-Difference/Solution.go create mode 100644 leetcode/3401-3500/3432.Count-Partitions-with-Even-Sum-Difference/Solution_test.go create mode 100755 leetcode/3401-3500/3433.Count-Mentions-Per-User/README.md create mode 100644 leetcode/3401-3500/3433.Count-Mentions-Per-User/Solution.go create mode 100644 leetcode/3401-3500/3433.Count-Mentions-Per-User/Solution_test.go create mode 100755 leetcode/3401-3500/3434.Maximum-Frequency-After-Subarray-Operation/README.md create mode 100644 leetcode/3401-3500/3434.Maximum-Frequency-After-Subarray-Operation/Solution.go create mode 100644 leetcode/3401-3500/3434.Maximum-Frequency-After-Subarray-Operation/Solution_test.go create mode 100755 leetcode/3401-3500/3435.Frequencies-of-Shortest-Supersequences/README.md create mode 100644 leetcode/3401-3500/3435.Frequencies-of-Shortest-Supersequences/Solution.go create mode 100644 leetcode/3401-3500/3435.Frequencies-of-Shortest-Supersequences/Solution_test.go create mode 100755 leetcode/3401-3500/3438.Find-Valid-Pair-of-Adjacent-Digits-in-String/README.md create mode 100644 leetcode/3401-3500/3438.Find-Valid-Pair-of-Adjacent-Digits-in-String/Solution.go create mode 100644 leetcode/3401-3500/3438.Find-Valid-Pair-of-Adjacent-Digits-in-String/Solution_test.go create mode 100755 leetcode/3401-3500/3439.Reschedule-Meetings-for-Maximum-Free-Time-I/README.md create mode 100644 leetcode/3401-3500/3439.Reschedule-Meetings-for-Maximum-Free-Time-I/Solution.go create mode 100644 leetcode/3401-3500/3439.Reschedule-Meetings-for-Maximum-Free-Time-I/Solution_test.go create mode 100755 leetcode/3401-3500/3440.Reschedule-Meetings-for-Maximum-Free-Time-II/README.md create mode 100644 leetcode/3401-3500/3440.Reschedule-Meetings-for-Maximum-Free-Time-II/Solution.go create mode 100644 leetcode/3401-3500/3440.Reschedule-Meetings-for-Maximum-Free-Time-II/Solution_test.go create mode 100755 leetcode/3401-3500/3441.Minimum-Cost-Good-Caption/README.md create mode 100644 leetcode/3401-3500/3441.Minimum-Cost-Good-Caption/Solution.go create mode 100644 leetcode/3401-3500/3441.Minimum-Cost-Good-Caption/Solution_test.go create mode 100755 leetcode/3401-3500/3442.Maximum-Difference-Between-Even-and-Odd-Frequency-I/README.md create mode 100644 leetcode/3401-3500/3442.Maximum-Difference-Between-Even-and-Odd-Frequency-I/Solution.go create mode 100644 leetcode/3401-3500/3442.Maximum-Difference-Between-Even-and-Odd-Frequency-I/Solution_test.go create mode 100755 leetcode/3401-3500/3443.Maximum-Manhattan-Distance-After-K-Changes/README.md create mode 100644 leetcode/3401-3500/3443.Maximum-Manhattan-Distance-After-K-Changes/Solution.go create mode 100644 leetcode/3401-3500/3443.Maximum-Manhattan-Distance-After-K-Changes/Solution_test.go create mode 100755 leetcode/3401-3500/3444.Minimum-Increments-for-Target-Multiples-in-an-Array/README.md create mode 100644 leetcode/3401-3500/3444.Minimum-Increments-for-Target-Multiples-in-an-Array/Solution.go create mode 100644 leetcode/3401-3500/3444.Minimum-Increments-for-Target-Multiples-in-an-Array/Solution_test.go create mode 100755 leetcode/3401-3500/3445.Maximum-Difference-Between-Even-and-Odd-Frequency-II/README.md create mode 100644 leetcode/3401-3500/3445.Maximum-Difference-Between-Even-and-Odd-Frequency-II/Solution.go create mode 100644 leetcode/3401-3500/3445.Maximum-Difference-Between-Even-and-Odd-Frequency-II/Solution_test.go create mode 100755 leetcode/3401-3500/3446.Sort-Matrix-by-Diagonals/README.md create mode 100644 leetcode/3401-3500/3446.Sort-Matrix-by-Diagonals/Solution.go create mode 100644 leetcode/3401-3500/3446.Sort-Matrix-by-Diagonals/Solution_test.go create mode 100755 leetcode/3401-3500/3447.Assign-Elements-to-Groups-with-Constraints/README.md create mode 100644 leetcode/3401-3500/3447.Assign-Elements-to-Groups-with-Constraints/Solution.go create mode 100644 leetcode/3401-3500/3447.Assign-Elements-to-Groups-with-Constraints/Solution_test.go create mode 100755 leetcode/3401-3500/3448.Count-Substrings-Divisible-By-Last-Digit/README.md create mode 100644 leetcode/3401-3500/3448.Count-Substrings-Divisible-By-Last-Digit/Solution.go create mode 100644 leetcode/3401-3500/3448.Count-Substrings-Divisible-By-Last-Digit/Solution_test.go create mode 100755 leetcode/3401-3500/3449.Maximize-the-Minimum-Game-Score/README.md create mode 100644 leetcode/3401-3500/3449.Maximize-the-Minimum-Game-Score/Solution.go create mode 100644 leetcode/3401-3500/3449.Maximize-the-Minimum-Game-Score/Solution_test.go create mode 100755 leetcode/3401-3500/3452.Sum-of-Good-Numbers/README.md create mode 100644 leetcode/3401-3500/3452.Sum-of-Good-Numbers/Solution.go create mode 100644 leetcode/3401-3500/3452.Sum-of-Good-Numbers/Solution_test.go create mode 100755 leetcode/3401-3500/3453.Separate-Squares-I/README.md create mode 100644 leetcode/3401-3500/3453.Separate-Squares-I/Solution.go create mode 100644 leetcode/3401-3500/3453.Separate-Squares-I/Solution_test.go create mode 100755 leetcode/3401-3500/3454.Separate-Squares-II/README.md create mode 100644 leetcode/3401-3500/3454.Separate-Squares-II/Solution.go create mode 100644 leetcode/3401-3500/3454.Separate-Squares-II/Solution_test.go create mode 100755 leetcode/3401-3500/3455.Shortest-Matching-Substring/README.md create mode 100644 leetcode/3401-3500/3455.Shortest-Matching-Substring/Solution.go create mode 100644 leetcode/3401-3500/3455.Shortest-Matching-Substring/Solution_test.go create mode 100755 leetcode/3401-3500/3456.Find-Special-Substring-of-Length-K/README.md create mode 100644 leetcode/3401-3500/3456.Find-Special-Substring-of-Length-K/Solution.go create mode 100644 leetcode/3401-3500/3456.Find-Special-Substring-of-Length-K/Solution_test.go create mode 100755 leetcode/3401-3500/3457.Eat-Pizzas!/README.md create mode 100644 leetcode/3401-3500/3457.Eat-Pizzas!/Solution.go create mode 100644 leetcode/3401-3500/3457.Eat-Pizzas!/Solution_test.go create mode 100755 leetcode/3401-3500/3458.Select-K-Disjoint-Special-Substrings/README.md create mode 100644 leetcode/3401-3500/3458.Select-K-Disjoint-Special-Substrings/Solution.go create mode 100644 leetcode/3401-3500/3458.Select-K-Disjoint-Special-Substrings/Solution_test.go create mode 100755 leetcode/3401-3500/3459.Length-of-Longest-V-Shaped-Diagonal-Segment/README.md create mode 100644 leetcode/3401-3500/3459.Length-of-Longest-V-Shaped-Diagonal-Segment/Solution.go create mode 100644 leetcode/3401-3500/3459.Length-of-Longest-V-Shaped-Diagonal-Segment/Solution_test.go create mode 100755 leetcode/3401-3500/3461.Check-If-Digits-Are-Equal-in-String-After-Operations-I/README.md create mode 100644 leetcode/3401-3500/3461.Check-If-Digits-Are-Equal-in-String-After-Operations-I/Solution.go create mode 100644 leetcode/3401-3500/3461.Check-If-Digits-Are-Equal-in-String-After-Operations-I/Solution_test.go create mode 100755 leetcode/3401-3500/3462.Maximum-Sum-With-at-Most-K-Elements/README.md create mode 100644 leetcode/3401-3500/3462.Maximum-Sum-With-at-Most-K-Elements/Solution.go create mode 100644 leetcode/3401-3500/3462.Maximum-Sum-With-at-Most-K-Elements/Solution_test.go create mode 100755 leetcode/3401-3500/3463.Check-If-Digits-Are-Equal-in-String-After-Operations-II/README.md create mode 100644 leetcode/3401-3500/3463.Check-If-Digits-Are-Equal-in-String-After-Operations-II/Solution.go create mode 100644 leetcode/3401-3500/3463.Check-If-Digits-Are-Equal-in-String-After-Operations-II/Solution_test.go create mode 100755 leetcode/3401-3500/3464.Maximize-the-Distance-Between-Points-on-a-Square/README.md create mode 100644 leetcode/3401-3500/3464.Maximize-the-Distance-Between-Points-on-a-Square/Solution.go create mode 100644 leetcode/3401-3500/3464.Maximize-the-Distance-Between-Points-on-a-Square/Solution_test.go create mode 100755 leetcode/3401-3500/3467.Transform-Array-by-Parity/README.md create mode 100644 leetcode/3401-3500/3467.Transform-Array-by-Parity/Solution.go create mode 100644 leetcode/3401-3500/3467.Transform-Array-by-Parity/Solution_test.go create mode 100755 leetcode/3401-3500/3468.Find-the-Number-of-Copy-Arrays/README.md create mode 100644 leetcode/3401-3500/3468.Find-the-Number-of-Copy-Arrays/Solution.go create mode 100644 leetcode/3401-3500/3468.Find-the-Number-of-Copy-Arrays/Solution_test.go create mode 100755 leetcode/3401-3500/3469.Find-Minimum-Cost-to-Remove-Array-Elements/README.md create mode 100644 leetcode/3401-3500/3469.Find-Minimum-Cost-to-Remove-Array-Elements/Solution.go create mode 100644 leetcode/3401-3500/3469.Find-Minimum-Cost-to-Remove-Array-Elements/Solution_test.go create mode 100755 leetcode/3401-3500/3470.Permutations-IV/README.md create mode 100644 leetcode/3401-3500/3470.Permutations-IV/Solution.go create mode 100644 leetcode/3401-3500/3470.Permutations-IV/Solution_test.go create mode 100755 leetcode/3401-3500/3471.Find-the-Largest-Almost-Missing-Integer/README.md create mode 100644 leetcode/3401-3500/3471.Find-the-Largest-Almost-Missing-Integer/Solution.go create mode 100644 leetcode/3401-3500/3471.Find-the-Largest-Almost-Missing-Integer/Solution_test.go create mode 100755 leetcode/3401-3500/3472.Longest-Palindromic-Subsequence-After-at-Most-K-Operations/README.md create mode 100644 leetcode/3401-3500/3472.Longest-Palindromic-Subsequence-After-at-Most-K-Operations/Solution.go create mode 100644 leetcode/3401-3500/3472.Longest-Palindromic-Subsequence-After-at-Most-K-Operations/Solution_test.go create mode 100755 leetcode/3401-3500/3473.Sum-of-K-Subarrays-With-Length-at-Least-M/README.md create mode 100644 leetcode/3401-3500/3473.Sum-of-K-Subarrays-With-Length-at-Least-M/Solution.go create mode 100644 leetcode/3401-3500/3473.Sum-of-K-Subarrays-With-Length-at-Least-M/Solution_test.go create mode 100755 leetcode/3401-3500/3474.Lexicographically-Smallest-Generated-String/README.md create mode 100644 leetcode/3401-3500/3474.Lexicographically-Smallest-Generated-String/Solution.go create mode 100644 leetcode/3401-3500/3474.Lexicographically-Smallest-Generated-String/Solution_test.go create mode 100755 leetcode/3401-3500/3477.Fruits-Into-Baskets-II/README.md create mode 100644 leetcode/3401-3500/3477.Fruits-Into-Baskets-II/Solution.go create mode 100644 leetcode/3401-3500/3477.Fruits-Into-Baskets-II/Solution_test.go create mode 100755 leetcode/3401-3500/3478.Choose-K-Elements-With-Maximum-Sum/README.md create mode 100644 leetcode/3401-3500/3478.Choose-K-Elements-With-Maximum-Sum/Solution.go create mode 100644 leetcode/3401-3500/3478.Choose-K-Elements-With-Maximum-Sum/Solution_test.go create mode 100755 leetcode/3401-3500/3479.Fruits-Into-Baskets-III/README.md create mode 100644 leetcode/3401-3500/3479.Fruits-Into-Baskets-III/Solution.go create mode 100644 leetcode/3401-3500/3479.Fruits-Into-Baskets-III/Solution_test.go create mode 100755 leetcode/3401-3500/3480.Maximize-Subarrays-After-Removing-One-Conflicting-Pair/README.md create mode 100644 leetcode/3401-3500/3480.Maximize-Subarrays-After-Removing-One-Conflicting-Pair/Solution.go create mode 100644 leetcode/3401-3500/3480.Maximize-Subarrays-After-Removing-One-Conflicting-Pair/Solution_test.go create mode 100755 leetcode/3401-3500/3483.Unique-3-Digit-Even-Numbers/README.md create mode 100644 leetcode/3401-3500/3483.Unique-3-Digit-Even-Numbers/Solution.go create mode 100644 leetcode/3401-3500/3483.Unique-3-Digit-Even-Numbers/Solution_test.go create mode 100755 leetcode/3401-3500/3484.Design-Spreadsheet/README.md create mode 100644 leetcode/3401-3500/3484.Design-Spreadsheet/Solution.go create mode 100644 leetcode/3401-3500/3484.Design-Spreadsheet/Solution_test.go create mode 100755 leetcode/3401-3500/3485.Longest-Common-Prefix-of-K-Strings-After-Removal/README.md create mode 100644 leetcode/3401-3500/3485.Longest-Common-Prefix-of-K-Strings-After-Removal/Solution.go create mode 100644 leetcode/3401-3500/3485.Longest-Common-Prefix-of-K-Strings-After-Removal/Solution_test.go create mode 100755 leetcode/3401-3500/3486.Longest-Special-Path-II/README.md create mode 100644 leetcode/3401-3500/3486.Longest-Special-Path-II/Solution.go create mode 100644 leetcode/3401-3500/3486.Longest-Special-Path-II/Solution_test.go create mode 100755 leetcode/3401-3500/3487.Maximum-Unique-Subarray-Sum-After-Deletion/README.md create mode 100644 leetcode/3401-3500/3487.Maximum-Unique-Subarray-Sum-After-Deletion/Solution.go create mode 100644 leetcode/3401-3500/3487.Maximum-Unique-Subarray-Sum-After-Deletion/Solution_test.go create mode 100755 leetcode/3401-3500/3488.Closest-Equal-Element-Queries/README.md create mode 100644 leetcode/3401-3500/3488.Closest-Equal-Element-Queries/Solution.go create mode 100644 leetcode/3401-3500/3488.Closest-Equal-Element-Queries/Solution_test.go create mode 100755 leetcode/3401-3500/3489.Zero-Array-Transformation-IV/README.md create mode 100644 leetcode/3401-3500/3489.Zero-Array-Transformation-IV/Solution.go create mode 100644 leetcode/3401-3500/3489.Zero-Array-Transformation-IV/Solution_test.go create mode 100755 leetcode/3401-3500/3490.Count-Beautiful-Numbers/README.md create mode 100644 leetcode/3401-3500/3490.Count-Beautiful-Numbers/Solution.go create mode 100644 leetcode/3401-3500/3490.Count-Beautiful-Numbers/Solution_test.go create mode 100755 leetcode/3401-3500/3492.Maximum-Containers-on-a-Ship/README.md create mode 100644 leetcode/3401-3500/3492.Maximum-Containers-on-a-Ship/Solution.go create mode 100644 leetcode/3401-3500/3492.Maximum-Containers-on-a-Ship/Solution_test.go create mode 100755 leetcode/3401-3500/3493.Properties-Graph/README.md create mode 100644 leetcode/3401-3500/3493.Properties-Graph/Solution.go create mode 100644 leetcode/3401-3500/3493.Properties-Graph/Solution_test.go create mode 100755 leetcode/3401-3500/3494.Find-the-Minimum-Amount-of-Time-to-Brew-Potions/README.md create mode 100644 leetcode/3401-3500/3494.Find-the-Minimum-Amount-of-Time-to-Brew-Potions/Solution.go create mode 100644 leetcode/3401-3500/3494.Find-the-Minimum-Amount-of-Time-to-Brew-Potions/Solution_test.go create mode 100755 leetcode/3401-3500/3495.Minimum-Operations-to-Make-Array-Elements-Zero/README.md create mode 100644 leetcode/3401-3500/3495.Minimum-Operations-to-Make-Array-Elements-Zero/Solution.go create mode 100644 leetcode/3401-3500/3495.Minimum-Operations-to-Make-Array-Elements-Zero/Solution_test.go create mode 100755 leetcode/3401-3500/3498.Reverse-Degree-of-a-String/README.md create mode 100644 leetcode/3401-3500/3498.Reverse-Degree-of-a-String/Solution.go create mode 100644 leetcode/3401-3500/3498.Reverse-Degree-of-a-String/Solution_test.go create mode 100755 leetcode/3401-3500/3499.Maximize-Active-Section-with-Trade-I/README.md create mode 100644 leetcode/3401-3500/3499.Maximize-Active-Section-with-Trade-I/Solution.go create mode 100644 leetcode/3401-3500/3499.Maximize-Active-Section-with-Trade-I/Solution_test.go create mode 100755 leetcode/3401-3500/3500.Minimum-Cost-to-Divide-Array-Into-Subarrays/README.md create mode 100644 leetcode/3401-3500/3500.Minimum-Cost-to-Divide-Array-Into-Subarrays/Solution.go create mode 100644 leetcode/3401-3500/3500.Minimum-Cost-to-Divide-Array-Into-Subarrays/Solution_test.go diff --git a/cmd/main.go b/cmd/main.go index 7d5835f66..759d7345b 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -35,7 +35,8 @@ func main() { //leetcode.MakeDirFromTo(problems, 2901, 3000) //leetcode.MakeDirFromTo(problems, 3101, 3200) //leetcode.MakeDirFromTo(problems, 3201, 3300) - leetcode.MakeDirFromTo(problems, 3301, 3400) + //leetcode.MakeDirFromTo(problems, 3301, 3400) + leetcode.MakeDirFromTo(problems, 3401, 3500) // leetcode.MakeDir(problems) diff --git a/leetcode/3401-3500/3402.Minimum-Operations-to-Make-Columns-Strictly-Increasing/README.md b/leetcode/3401-3500/3402.Minimum-Operations-to-Make-Columns-Strictly-Increasing/README.md new file mode 100755 index 000000000..f0300a875 --- /dev/null +++ b/leetcode/3401-3500/3402.Minimum-Operations-to-Make-Columns-Strictly-Increasing/README.md @@ -0,0 +1,32 @@ +# [3402.Minimum Operations to Make Columns Strictly Increasing][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 Columns Strictly Increasing +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/minimum-operations-to-make-columns-strictly-increasing/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3402.Minimum-Operations-to-Make-Columns-Strictly-Increasing/Solution.go b/leetcode/3401-3500/3402.Minimum-Operations-to-Make-Columns-Strictly-Increasing/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3402.Minimum-Operations-to-Make-Columns-Strictly-Increasing/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3402.Minimum-Operations-to-Make-Columns-Strictly-Increasing/Solution_test.go b/leetcode/3401-3500/3402.Minimum-Operations-to-Make-Columns-Strictly-Increasing/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3402.Minimum-Operations-to-Make-Columns-Strictly-Increasing/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/3401-3500/3403.Find-the-Lexicographically-Largest-String-From-the-Box-I/README.md b/leetcode/3401-3500/3403.Find-the-Lexicographically-Largest-String-From-the-Box-I/README.md new file mode 100755 index 000000000..565ca9c20 --- /dev/null +++ b/leetcode/3401-3500/3403.Find-the-Lexicographically-Largest-String-From-the-Box-I/README.md @@ -0,0 +1,32 @@ +# [3403.Find the Lexicographically Largest String From the Box 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 Lexicographically Largest String From the Box I +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/find-the-lexicographically-largest-string-from-the-box-i/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3403.Find-the-Lexicographically-Largest-String-From-the-Box-I/Solution.go b/leetcode/3401-3500/3403.Find-the-Lexicographically-Largest-String-From-the-Box-I/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3403.Find-the-Lexicographically-Largest-String-From-the-Box-I/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3403.Find-the-Lexicographically-Largest-String-From-the-Box-I/Solution_test.go b/leetcode/3401-3500/3403.Find-the-Lexicographically-Largest-String-From-the-Box-I/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3403.Find-the-Lexicographically-Largest-String-From-the-Box-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/3401-3500/3404.Count-Special-Subsequences/README.md b/leetcode/3401-3500/3404.Count-Special-Subsequences/README.md new file mode 100755 index 000000000..5addb41f0 --- /dev/null +++ b/leetcode/3401-3500/3404.Count-Special-Subsequences/README.md @@ -0,0 +1,32 @@ +# [3404.Count Special 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 +> ... +Count Special Subsequences +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/count-special-subsequences/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3404.Count-Special-Subsequences/Solution.go b/leetcode/3401-3500/3404.Count-Special-Subsequences/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3404.Count-Special-Subsequences/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3404.Count-Special-Subsequences/Solution_test.go b/leetcode/3401-3500/3404.Count-Special-Subsequences/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3404.Count-Special-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/3401-3500/3405.Count-the-Number-of-Arrays-with-K-Matching-Adjacent-Elements/README.md b/leetcode/3401-3500/3405.Count-the-Number-of-Arrays-with-K-Matching-Adjacent-Elements/README.md new file mode 100755 index 000000000..1e150cbc8 --- /dev/null +++ b/leetcode/3401-3500/3405.Count-the-Number-of-Arrays-with-K-Matching-Adjacent-Elements/README.md @@ -0,0 +1,32 @@ +# [3405.Count the Number of Arrays with K Matching Adjacent Elements][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 Arrays with K Matching Adjacent Elements +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/count-the-number-of-arrays-with-k-matching-adjacent-elements/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3405.Count-the-Number-of-Arrays-with-K-Matching-Adjacent-Elements/Solution.go b/leetcode/3401-3500/3405.Count-the-Number-of-Arrays-with-K-Matching-Adjacent-Elements/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3405.Count-the-Number-of-Arrays-with-K-Matching-Adjacent-Elements/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3405.Count-the-Number-of-Arrays-with-K-Matching-Adjacent-Elements/Solution_test.go b/leetcode/3401-3500/3405.Count-the-Number-of-Arrays-with-K-Matching-Adjacent-Elements/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3405.Count-the-Number-of-Arrays-with-K-Matching-Adjacent-Elements/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/3401-3500/3407.Substring-Matching-Pattern/README.md b/leetcode/3401-3500/3407.Substring-Matching-Pattern/README.md new file mode 100755 index 000000000..39570a024 --- /dev/null +++ b/leetcode/3401-3500/3407.Substring-Matching-Pattern/README.md @@ -0,0 +1,32 @@ +# [3407.Substring Matching Pattern][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 +> ... +Substring Matching Pattern +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/substring-matching-pattern/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3407.Substring-Matching-Pattern/Solution.go b/leetcode/3401-3500/3407.Substring-Matching-Pattern/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3407.Substring-Matching-Pattern/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3407.Substring-Matching-Pattern/Solution_test.go b/leetcode/3401-3500/3407.Substring-Matching-Pattern/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3407.Substring-Matching-Pattern/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/3401-3500/3408.Design-Task-Manager/README.md b/leetcode/3401-3500/3408.Design-Task-Manager/README.md new file mode 100755 index 000000000..4c979a7eb --- /dev/null +++ b/leetcode/3401-3500/3408.Design-Task-Manager/README.md @@ -0,0 +1,32 @@ +# [3408.Design Task Manager][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 +> ... +Design Task Manager +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/design-task-manager/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3408.Design-Task-Manager/Solution.go b/leetcode/3401-3500/3408.Design-Task-Manager/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3408.Design-Task-Manager/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3408.Design-Task-Manager/Solution_test.go b/leetcode/3401-3500/3408.Design-Task-Manager/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3408.Design-Task-Manager/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/3401-3500/3409.Longest-Subsequence-With-Decreasing-Adjacent-Difference/README.md b/leetcode/3401-3500/3409.Longest-Subsequence-With-Decreasing-Adjacent-Difference/README.md new file mode 100755 index 000000000..e459d54d2 --- /dev/null +++ b/leetcode/3401-3500/3409.Longest-Subsequence-With-Decreasing-Adjacent-Difference/README.md @@ -0,0 +1,32 @@ +# [3409.Longest Subsequence With Decreasing Adjacent 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 +> ... +Longest Subsequence With Decreasing Adjacent Difference +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/longest-subsequence-with-decreasing-adjacent-difference/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3409.Longest-Subsequence-With-Decreasing-Adjacent-Difference/Solution.go b/leetcode/3401-3500/3409.Longest-Subsequence-With-Decreasing-Adjacent-Difference/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3409.Longest-Subsequence-With-Decreasing-Adjacent-Difference/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3409.Longest-Subsequence-With-Decreasing-Adjacent-Difference/Solution_test.go b/leetcode/3401-3500/3409.Longest-Subsequence-With-Decreasing-Adjacent-Difference/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3409.Longest-Subsequence-With-Decreasing-Adjacent-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/3401-3500/3410.Maximize-Subarray-Sum-After-Removing-All-Occurrences-of-One-Element/README.md b/leetcode/3401-3500/3410.Maximize-Subarray-Sum-After-Removing-All-Occurrences-of-One-Element/README.md new file mode 100755 index 000000000..70c974fd7 --- /dev/null +++ b/leetcode/3401-3500/3410.Maximize-Subarray-Sum-After-Removing-All-Occurrences-of-One-Element/README.md @@ -0,0 +1,32 @@ +# [3410.Maximize Subarray Sum After Removing All Occurrences of One Element][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 Subarray Sum After Removing All Occurrences of One Element +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximize-subarray-sum-after-removing-all-occurrences-of-one-element/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3410.Maximize-Subarray-Sum-After-Removing-All-Occurrences-of-One-Element/Solution.go b/leetcode/3401-3500/3410.Maximize-Subarray-Sum-After-Removing-All-Occurrences-of-One-Element/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3410.Maximize-Subarray-Sum-After-Removing-All-Occurrences-of-One-Element/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3410.Maximize-Subarray-Sum-After-Removing-All-Occurrences-of-One-Element/Solution_test.go b/leetcode/3401-3500/3410.Maximize-Subarray-Sum-After-Removing-All-Occurrences-of-One-Element/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3410.Maximize-Subarray-Sum-After-Removing-All-Occurrences-of-One-Element/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/3401-3500/3411.Maximum-Subarray-With-Equal-Products/README.md b/leetcode/3401-3500/3411.Maximum-Subarray-With-Equal-Products/README.md new file mode 100755 index 000000000..74fcaceab --- /dev/null +++ b/leetcode/3401-3500/3411.Maximum-Subarray-With-Equal-Products/README.md @@ -0,0 +1,32 @@ +# [3411.Maximum Subarray With Equal Products][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 With Equal Products +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximum-subarray-with-equal-products/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3411.Maximum-Subarray-With-Equal-Products/Solution.go b/leetcode/3401-3500/3411.Maximum-Subarray-With-Equal-Products/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3411.Maximum-Subarray-With-Equal-Products/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3411.Maximum-Subarray-With-Equal-Products/Solution_test.go b/leetcode/3401-3500/3411.Maximum-Subarray-With-Equal-Products/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3411.Maximum-Subarray-With-Equal-Products/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/3401-3500/3412.Find-Mirror-Score-of-a-String/README.md b/leetcode/3401-3500/3412.Find-Mirror-Score-of-a-String/README.md new file mode 100755 index 000000000..303b8cc8d --- /dev/null +++ b/leetcode/3401-3500/3412.Find-Mirror-Score-of-a-String/README.md @@ -0,0 +1,32 @@ +# [3412.Find Mirror Score of a 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 Mirror Score of a String +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/find-mirror-score-of-a-string/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3412.Find-Mirror-Score-of-a-String/Solution.go b/leetcode/3401-3500/3412.Find-Mirror-Score-of-a-String/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3412.Find-Mirror-Score-of-a-String/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3412.Find-Mirror-Score-of-a-String/Solution_test.go b/leetcode/3401-3500/3412.Find-Mirror-Score-of-a-String/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3412.Find-Mirror-Score-of-a-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/3401-3500/3413.Maximum-Coins-From-K-Consecutive-Bags/README.md b/leetcode/3401-3500/3413.Maximum-Coins-From-K-Consecutive-Bags/README.md new file mode 100755 index 000000000..f9f38eab6 --- /dev/null +++ b/leetcode/3401-3500/3413.Maximum-Coins-From-K-Consecutive-Bags/README.md @@ -0,0 +1,32 @@ +# [3413.Maximum Coins From K Consecutive Bags][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 Coins From K Consecutive Bags +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximum-coins-from-k-consecutive-bags/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3413.Maximum-Coins-From-K-Consecutive-Bags/Solution.go b/leetcode/3401-3500/3413.Maximum-Coins-From-K-Consecutive-Bags/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3413.Maximum-Coins-From-K-Consecutive-Bags/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3413.Maximum-Coins-From-K-Consecutive-Bags/Solution_test.go b/leetcode/3401-3500/3413.Maximum-Coins-From-K-Consecutive-Bags/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3413.Maximum-Coins-From-K-Consecutive-Bags/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/3401-3500/3414.Maximum-Score-of-Non-overlapping-Intervals/README.md b/leetcode/3401-3500/3414.Maximum-Score-of-Non-overlapping-Intervals/README.md new file mode 100755 index 000000000..4fc85c66b --- /dev/null +++ b/leetcode/3401-3500/3414.Maximum-Score-of-Non-overlapping-Intervals/README.md @@ -0,0 +1,32 @@ +# [3414.Maximum Score of Non-overlapping Intervals][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 Score of Non-overlapping Intervals +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximum-score-of-non-overlapping-intervals/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3414.Maximum-Score-of-Non-overlapping-Intervals/Solution.go b/leetcode/3401-3500/3414.Maximum-Score-of-Non-overlapping-Intervals/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3414.Maximum-Score-of-Non-overlapping-Intervals/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3414.Maximum-Score-of-Non-overlapping-Intervals/Solution_test.go b/leetcode/3401-3500/3414.Maximum-Score-of-Non-overlapping-Intervals/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3414.Maximum-Score-of-Non-overlapping-Intervals/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/3401-3500/3417.Zigzag-Grid-Traversal-With-Skip/README.md b/leetcode/3401-3500/3417.Zigzag-Grid-Traversal-With-Skip/README.md new file mode 100755 index 000000000..94d5b9192 --- /dev/null +++ b/leetcode/3401-3500/3417.Zigzag-Grid-Traversal-With-Skip/README.md @@ -0,0 +1,32 @@ +# [3417.Zigzag Grid Traversal With Skip][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 +> ... +Zigzag Grid Traversal With Skip +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/zigzag-grid-traversal-with-skip/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3417.Zigzag-Grid-Traversal-With-Skip/Solution.go b/leetcode/3401-3500/3417.Zigzag-Grid-Traversal-With-Skip/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3417.Zigzag-Grid-Traversal-With-Skip/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3417.Zigzag-Grid-Traversal-With-Skip/Solution_test.go b/leetcode/3401-3500/3417.Zigzag-Grid-Traversal-With-Skip/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3417.Zigzag-Grid-Traversal-With-Skip/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/3401-3500/3418.Maximum-Amount-of-Money-Robot-Can-Earn/README.md b/leetcode/3401-3500/3418.Maximum-Amount-of-Money-Robot-Can-Earn/README.md new file mode 100755 index 000000000..f0a9f7158 --- /dev/null +++ b/leetcode/3401-3500/3418.Maximum-Amount-of-Money-Robot-Can-Earn/README.md @@ -0,0 +1,32 @@ +# [3418.Maximum Amount of Money Robot 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 Amount of Money Robot Can Earn +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximum-amount-of-money-robot-can-earn/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3418.Maximum-Amount-of-Money-Robot-Can-Earn/Solution.go b/leetcode/3401-3500/3418.Maximum-Amount-of-Money-Robot-Can-Earn/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3418.Maximum-Amount-of-Money-Robot-Can-Earn/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3418.Maximum-Amount-of-Money-Robot-Can-Earn/Solution_test.go b/leetcode/3401-3500/3418.Maximum-Amount-of-Money-Robot-Can-Earn/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3418.Maximum-Amount-of-Money-Robot-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/3401-3500/3419.Minimize-the-Maximum-Edge-Weight-of-Graph/README.md b/leetcode/3401-3500/3419.Minimize-the-Maximum-Edge-Weight-of-Graph/README.md new file mode 100755 index 000000000..2c7bf55ba --- /dev/null +++ b/leetcode/3401-3500/3419.Minimize-the-Maximum-Edge-Weight-of-Graph/README.md @@ -0,0 +1,32 @@ +# [3419.Minimize the Maximum Edge Weight of 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 +> ... +Minimize the Maximum Edge Weight of Graph +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/minimize-the-maximum-edge-weight-of-graph/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3419.Minimize-the-Maximum-Edge-Weight-of-Graph/Solution.go b/leetcode/3401-3500/3419.Minimize-the-Maximum-Edge-Weight-of-Graph/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3419.Minimize-the-Maximum-Edge-Weight-of-Graph/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3419.Minimize-the-Maximum-Edge-Weight-of-Graph/Solution_test.go b/leetcode/3401-3500/3419.Minimize-the-Maximum-Edge-Weight-of-Graph/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3419.Minimize-the-Maximum-Edge-Weight-of-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/3401-3500/3420.Count-Non-Decreasing-Subarrays-After-K-Operations/README.md b/leetcode/3401-3500/3420.Count-Non-Decreasing-Subarrays-After-K-Operations/README.md new file mode 100755 index 000000000..6a642f29c --- /dev/null +++ b/leetcode/3401-3500/3420.Count-Non-Decreasing-Subarrays-After-K-Operations/README.md @@ -0,0 +1,32 @@ +# [3420.Count Non-Decreasing Subarrays After K 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 +> ... +Count Non-Decreasing Subarrays After K Operations +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/count-non-decreasing-subarrays-after-k-operations/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3420.Count-Non-Decreasing-Subarrays-After-K-Operations/Solution.go b/leetcode/3401-3500/3420.Count-Non-Decreasing-Subarrays-After-K-Operations/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3420.Count-Non-Decreasing-Subarrays-After-K-Operations/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3420.Count-Non-Decreasing-Subarrays-After-K-Operations/Solution_test.go b/leetcode/3401-3500/3420.Count-Non-Decreasing-Subarrays-After-K-Operations/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3420.Count-Non-Decreasing-Subarrays-After-K-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/3401-3500/3423.Maximum-Difference-Between-Adjacent-Elements-in-a-Circular-Array/README.md b/leetcode/3401-3500/3423.Maximum-Difference-Between-Adjacent-Elements-in-a-Circular-Array/README.md new file mode 100755 index 000000000..9aee95b5e --- /dev/null +++ b/leetcode/3401-3500/3423.Maximum-Difference-Between-Adjacent-Elements-in-a-Circular-Array/README.md @@ -0,0 +1,32 @@ +# [3423.Maximum Difference Between Adjacent Elements in a Circular 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 +> ... +Maximum Difference Between Adjacent Elements in a Circular Array +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximum-difference-between-adjacent-elements-in-a-circular-array/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3423.Maximum-Difference-Between-Adjacent-Elements-in-a-Circular-Array/Solution.go b/leetcode/3401-3500/3423.Maximum-Difference-Between-Adjacent-Elements-in-a-Circular-Array/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3423.Maximum-Difference-Between-Adjacent-Elements-in-a-Circular-Array/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3423.Maximum-Difference-Between-Adjacent-Elements-in-a-Circular-Array/Solution_test.go b/leetcode/3401-3500/3423.Maximum-Difference-Between-Adjacent-Elements-in-a-Circular-Array/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3423.Maximum-Difference-Between-Adjacent-Elements-in-a-Circular-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/3401-3500/3424.Minimum-Cost-to-Make-Arrays-Identical/README.md b/leetcode/3401-3500/3424.Minimum-Cost-to-Make-Arrays-Identical/README.md new file mode 100755 index 000000000..8d0a64a22 --- /dev/null +++ b/leetcode/3401-3500/3424.Minimum-Cost-to-Make-Arrays-Identical/README.md @@ -0,0 +1,32 @@ +# [3424.Minimum Cost to Make Arrays Identical][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 Cost to Make Arrays Identical +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/minimum-cost-to-make-arrays-identical/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3424.Minimum-Cost-to-Make-Arrays-Identical/Solution.go b/leetcode/3401-3500/3424.Minimum-Cost-to-Make-Arrays-Identical/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3424.Minimum-Cost-to-Make-Arrays-Identical/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3424.Minimum-Cost-to-Make-Arrays-Identical/Solution_test.go b/leetcode/3401-3500/3424.Minimum-Cost-to-Make-Arrays-Identical/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3424.Minimum-Cost-to-Make-Arrays-Identical/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/3401-3500/3425.Longest-Special-Path/README.md b/leetcode/3401-3500/3425.Longest-Special-Path/README.md new file mode 100755 index 000000000..fc89f8450 --- /dev/null +++ b/leetcode/3401-3500/3425.Longest-Special-Path/README.md @@ -0,0 +1,32 @@ +# [3425.Longest Special Path][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 +> ... +Longest Special Path +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/longest-special-path/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3425.Longest-Special-Path/Solution.go b/leetcode/3401-3500/3425.Longest-Special-Path/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3425.Longest-Special-Path/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3425.Longest-Special-Path/Solution_test.go b/leetcode/3401-3500/3425.Longest-Special-Path/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3425.Longest-Special-Path/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/3401-3500/3426.Manhattan-Distances-of-All-Arrangements-of-Pieces/README.md b/leetcode/3401-3500/3426.Manhattan-Distances-of-All-Arrangements-of-Pieces/README.md new file mode 100755 index 000000000..e63182da8 --- /dev/null +++ b/leetcode/3401-3500/3426.Manhattan-Distances-of-All-Arrangements-of-Pieces/README.md @@ -0,0 +1,32 @@ +# [3426.Manhattan Distances of All Arrangements of Pieces][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 +> ... +Manhattan Distances of All Arrangements of Pieces +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/manhattan-distances-of-all-arrangements-of-pieces/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3426.Manhattan-Distances-of-All-Arrangements-of-Pieces/Solution.go b/leetcode/3401-3500/3426.Manhattan-Distances-of-All-Arrangements-of-Pieces/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3426.Manhattan-Distances-of-All-Arrangements-of-Pieces/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3426.Manhattan-Distances-of-All-Arrangements-of-Pieces/Solution_test.go b/leetcode/3401-3500/3426.Manhattan-Distances-of-All-Arrangements-of-Pieces/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3426.Manhattan-Distances-of-All-Arrangements-of-Pieces/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/3401-3500/3427.Sum-of-Variable-Length-Subarrays/README.md b/leetcode/3401-3500/3427.Sum-of-Variable-Length-Subarrays/README.md new file mode 100755 index 000000000..cea578261 --- /dev/null +++ b/leetcode/3401-3500/3427.Sum-of-Variable-Length-Subarrays/README.md @@ -0,0 +1,32 @@ +# [3427.Sum of Variable Length Subarrays][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 Variable Length Subarrays +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/sum-of-variable-length-subarrays/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3427.Sum-of-Variable-Length-Subarrays/Solution.go b/leetcode/3401-3500/3427.Sum-of-Variable-Length-Subarrays/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3427.Sum-of-Variable-Length-Subarrays/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3427.Sum-of-Variable-Length-Subarrays/Solution_test.go b/leetcode/3401-3500/3427.Sum-of-Variable-Length-Subarrays/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3427.Sum-of-Variable-Length-Subarrays/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/3401-3500/3428.Maximum-and-Minimum-Sums-of-at-Most-Size-K-Subsequences/README.md b/leetcode/3401-3500/3428.Maximum-and-Minimum-Sums-of-at-Most-Size-K-Subsequences/README.md new file mode 100755 index 000000000..50512273c --- /dev/null +++ b/leetcode/3401-3500/3428.Maximum-and-Minimum-Sums-of-at-Most-Size-K-Subsequences/README.md @@ -0,0 +1,32 @@ +# [3428.Maximum and Minimum Sums of at Most Size K 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 +> ... +Maximum and Minimum Sums of at Most Size K Subsequences +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximum-and-minimum-sums-of-at-most-size-k-subsequences/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3428.Maximum-and-Minimum-Sums-of-at-Most-Size-K-Subsequences/Solution.go b/leetcode/3401-3500/3428.Maximum-and-Minimum-Sums-of-at-Most-Size-K-Subsequences/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3428.Maximum-and-Minimum-Sums-of-at-Most-Size-K-Subsequences/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3428.Maximum-and-Minimum-Sums-of-at-Most-Size-K-Subsequences/Solution_test.go b/leetcode/3401-3500/3428.Maximum-and-Minimum-Sums-of-at-Most-Size-K-Subsequences/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3428.Maximum-and-Minimum-Sums-of-at-Most-Size-K-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/3401-3500/3429.Paint-House-IV/README.md b/leetcode/3401-3500/3429.Paint-House-IV/README.md new file mode 100755 index 000000000..cc4ae535c --- /dev/null +++ b/leetcode/3401-3500/3429.Paint-House-IV/README.md @@ -0,0 +1,32 @@ +# [3429.Paint House IV][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 +> ... +Paint House IV +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/paint-house-iv/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3429.Paint-House-IV/Solution.go b/leetcode/3401-3500/3429.Paint-House-IV/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3429.Paint-House-IV/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3429.Paint-House-IV/Solution_test.go b/leetcode/3401-3500/3429.Paint-House-IV/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3429.Paint-House-IV/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/3401-3500/3430.Maximum-and-Minimum-Sums-of-at-Most-Size-K-Subarrays/README.md b/leetcode/3401-3500/3430.Maximum-and-Minimum-Sums-of-at-Most-Size-K-Subarrays/README.md new file mode 100755 index 000000000..04db18012 --- /dev/null +++ b/leetcode/3401-3500/3430.Maximum-and-Minimum-Sums-of-at-Most-Size-K-Subarrays/README.md @@ -0,0 +1,32 @@ +# [3430.Maximum and Minimum Sums of at Most Size K Subarrays][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 and Minimum Sums of at Most Size K Subarrays +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximum-and-minimum-sums-of-at-most-size-k-subarrays/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3430.Maximum-and-Minimum-Sums-of-at-Most-Size-K-Subarrays/Solution.go b/leetcode/3401-3500/3430.Maximum-and-Minimum-Sums-of-at-Most-Size-K-Subarrays/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3430.Maximum-and-Minimum-Sums-of-at-Most-Size-K-Subarrays/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3430.Maximum-and-Minimum-Sums-of-at-Most-Size-K-Subarrays/Solution_test.go b/leetcode/3401-3500/3430.Maximum-and-Minimum-Sums-of-at-Most-Size-K-Subarrays/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3430.Maximum-and-Minimum-Sums-of-at-Most-Size-K-Subarrays/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/3401-3500/3432.Count-Partitions-with-Even-Sum-Difference/README.md b/leetcode/3401-3500/3432.Count-Partitions-with-Even-Sum-Difference/README.md new file mode 100755 index 000000000..b6fd9e07f --- /dev/null +++ b/leetcode/3401-3500/3432.Count-Partitions-with-Even-Sum-Difference/README.md @@ -0,0 +1,32 @@ +# [3432.Count Partitions with Even Sum 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 +> ... +Count Partitions with Even Sum Difference +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/count-partitions-with-even-sum-difference/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3432.Count-Partitions-with-Even-Sum-Difference/Solution.go b/leetcode/3401-3500/3432.Count-Partitions-with-Even-Sum-Difference/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3432.Count-Partitions-with-Even-Sum-Difference/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3432.Count-Partitions-with-Even-Sum-Difference/Solution_test.go b/leetcode/3401-3500/3432.Count-Partitions-with-Even-Sum-Difference/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3432.Count-Partitions-with-Even-Sum-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/3401-3500/3433.Count-Mentions-Per-User/README.md b/leetcode/3401-3500/3433.Count-Mentions-Per-User/README.md new file mode 100755 index 000000000..7c2e246b1 --- /dev/null +++ b/leetcode/3401-3500/3433.Count-Mentions-Per-User/README.md @@ -0,0 +1,32 @@ +# [3433.Count Mentions Per User][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 Mentions Per User +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/count-mentions-per-user/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3433.Count-Mentions-Per-User/Solution.go b/leetcode/3401-3500/3433.Count-Mentions-Per-User/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3433.Count-Mentions-Per-User/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3433.Count-Mentions-Per-User/Solution_test.go b/leetcode/3401-3500/3433.Count-Mentions-Per-User/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3433.Count-Mentions-Per-User/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/3401-3500/3434.Maximum-Frequency-After-Subarray-Operation/README.md b/leetcode/3401-3500/3434.Maximum-Frequency-After-Subarray-Operation/README.md new file mode 100755 index 000000000..00b2084a7 --- /dev/null +++ b/leetcode/3401-3500/3434.Maximum-Frequency-After-Subarray-Operation/README.md @@ -0,0 +1,32 @@ +# [3434.Maximum Frequency After Subarray Operation][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 After Subarray Operation +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximum-frequency-after-subarray-operation/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3434.Maximum-Frequency-After-Subarray-Operation/Solution.go b/leetcode/3401-3500/3434.Maximum-Frequency-After-Subarray-Operation/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3434.Maximum-Frequency-After-Subarray-Operation/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3434.Maximum-Frequency-After-Subarray-Operation/Solution_test.go b/leetcode/3401-3500/3434.Maximum-Frequency-After-Subarray-Operation/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3434.Maximum-Frequency-After-Subarray-Operation/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/3401-3500/3435.Frequencies-of-Shortest-Supersequences/README.md b/leetcode/3401-3500/3435.Frequencies-of-Shortest-Supersequences/README.md new file mode 100755 index 000000000..23c1feae6 --- /dev/null +++ b/leetcode/3401-3500/3435.Frequencies-of-Shortest-Supersequences/README.md @@ -0,0 +1,32 @@ +# [3435.Frequencies of Shortest Supersequences][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 +> ... +Frequencies of Shortest Supersequences +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/frequencies-of-shortest-supersequences/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3435.Frequencies-of-Shortest-Supersequences/Solution.go b/leetcode/3401-3500/3435.Frequencies-of-Shortest-Supersequences/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3435.Frequencies-of-Shortest-Supersequences/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3435.Frequencies-of-Shortest-Supersequences/Solution_test.go b/leetcode/3401-3500/3435.Frequencies-of-Shortest-Supersequences/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3435.Frequencies-of-Shortest-Supersequences/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/3401-3500/3438.Find-Valid-Pair-of-Adjacent-Digits-in-String/README.md b/leetcode/3401-3500/3438.Find-Valid-Pair-of-Adjacent-Digits-in-String/README.md new file mode 100755 index 000000000..3ca5a6f78 --- /dev/null +++ b/leetcode/3401-3500/3438.Find-Valid-Pair-of-Adjacent-Digits-in-String/README.md @@ -0,0 +1,32 @@ +# [3438.Find Valid Pair of Adjacent Digits in 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 Valid Pair of Adjacent Digits in String +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/find-valid-pair-of-adjacent-digits-in-string/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3438.Find-Valid-Pair-of-Adjacent-Digits-in-String/Solution.go b/leetcode/3401-3500/3438.Find-Valid-Pair-of-Adjacent-Digits-in-String/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3438.Find-Valid-Pair-of-Adjacent-Digits-in-String/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3438.Find-Valid-Pair-of-Adjacent-Digits-in-String/Solution_test.go b/leetcode/3401-3500/3438.Find-Valid-Pair-of-Adjacent-Digits-in-String/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3438.Find-Valid-Pair-of-Adjacent-Digits-in-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/3401-3500/3439.Reschedule-Meetings-for-Maximum-Free-Time-I/README.md b/leetcode/3401-3500/3439.Reschedule-Meetings-for-Maximum-Free-Time-I/README.md new file mode 100755 index 000000000..454428895 --- /dev/null +++ b/leetcode/3401-3500/3439.Reschedule-Meetings-for-Maximum-Free-Time-I/README.md @@ -0,0 +1,32 @@ +# [3439.Reschedule Meetings for Maximum Free Time 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 +> ... +Reschedule Meetings for Maximum Free Time I +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/reschedule-meetings-for-maximum-free-time-i/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3439.Reschedule-Meetings-for-Maximum-Free-Time-I/Solution.go b/leetcode/3401-3500/3439.Reschedule-Meetings-for-Maximum-Free-Time-I/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3439.Reschedule-Meetings-for-Maximum-Free-Time-I/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3439.Reschedule-Meetings-for-Maximum-Free-Time-I/Solution_test.go b/leetcode/3401-3500/3439.Reschedule-Meetings-for-Maximum-Free-Time-I/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3439.Reschedule-Meetings-for-Maximum-Free-Time-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/3401-3500/3440.Reschedule-Meetings-for-Maximum-Free-Time-II/README.md b/leetcode/3401-3500/3440.Reschedule-Meetings-for-Maximum-Free-Time-II/README.md new file mode 100755 index 000000000..67bc9be06 --- /dev/null +++ b/leetcode/3401-3500/3440.Reschedule-Meetings-for-Maximum-Free-Time-II/README.md @@ -0,0 +1,32 @@ +# [3440.Reschedule Meetings for Maximum Free Time 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 +> ... +Reschedule Meetings for Maximum Free Time II +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/reschedule-meetings-for-maximum-free-time-ii/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3440.Reschedule-Meetings-for-Maximum-Free-Time-II/Solution.go b/leetcode/3401-3500/3440.Reschedule-Meetings-for-Maximum-Free-Time-II/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3440.Reschedule-Meetings-for-Maximum-Free-Time-II/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3440.Reschedule-Meetings-for-Maximum-Free-Time-II/Solution_test.go b/leetcode/3401-3500/3440.Reschedule-Meetings-for-Maximum-Free-Time-II/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3440.Reschedule-Meetings-for-Maximum-Free-Time-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/3401-3500/3441.Minimum-Cost-Good-Caption/README.md b/leetcode/3401-3500/3441.Minimum-Cost-Good-Caption/README.md new file mode 100755 index 000000000..7a72288a8 --- /dev/null +++ b/leetcode/3401-3500/3441.Minimum-Cost-Good-Caption/README.md @@ -0,0 +1,32 @@ +# [3441.Minimum Cost Good Caption][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 Cost Good Caption +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/minimum-cost-good-caption/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3441.Minimum-Cost-Good-Caption/Solution.go b/leetcode/3401-3500/3441.Minimum-Cost-Good-Caption/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3441.Minimum-Cost-Good-Caption/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3441.Minimum-Cost-Good-Caption/Solution_test.go b/leetcode/3401-3500/3441.Minimum-Cost-Good-Caption/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3441.Minimum-Cost-Good-Caption/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/3401-3500/3442.Maximum-Difference-Between-Even-and-Odd-Frequency-I/README.md b/leetcode/3401-3500/3442.Maximum-Difference-Between-Even-and-Odd-Frequency-I/README.md new file mode 100755 index 000000000..99a90ad28 --- /dev/null +++ b/leetcode/3401-3500/3442.Maximum-Difference-Between-Even-and-Odd-Frequency-I/README.md @@ -0,0 +1,32 @@ +# [3442.Maximum Difference Between Even and Odd Frequency 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 Difference Between Even and Odd Frequency I +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximum-difference-between-even-and-odd-frequency-i/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3442.Maximum-Difference-Between-Even-and-Odd-Frequency-I/Solution.go b/leetcode/3401-3500/3442.Maximum-Difference-Between-Even-and-Odd-Frequency-I/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3442.Maximum-Difference-Between-Even-and-Odd-Frequency-I/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3442.Maximum-Difference-Between-Even-and-Odd-Frequency-I/Solution_test.go b/leetcode/3401-3500/3442.Maximum-Difference-Between-Even-and-Odd-Frequency-I/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3442.Maximum-Difference-Between-Even-and-Odd-Frequency-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/3401-3500/3443.Maximum-Manhattan-Distance-After-K-Changes/README.md b/leetcode/3401-3500/3443.Maximum-Manhattan-Distance-After-K-Changes/README.md new file mode 100755 index 000000000..ba4b87990 --- /dev/null +++ b/leetcode/3401-3500/3443.Maximum-Manhattan-Distance-After-K-Changes/README.md @@ -0,0 +1,32 @@ +# [3443.Maximum Manhattan Distance After K 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 +> ... +Maximum Manhattan Distance After K Changes +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximum-manhattan-distance-after-k-changes/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3443.Maximum-Manhattan-Distance-After-K-Changes/Solution.go b/leetcode/3401-3500/3443.Maximum-Manhattan-Distance-After-K-Changes/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3443.Maximum-Manhattan-Distance-After-K-Changes/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3443.Maximum-Manhattan-Distance-After-K-Changes/Solution_test.go b/leetcode/3401-3500/3443.Maximum-Manhattan-Distance-After-K-Changes/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3443.Maximum-Manhattan-Distance-After-K-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/3401-3500/3444.Minimum-Increments-for-Target-Multiples-in-an-Array/README.md b/leetcode/3401-3500/3444.Minimum-Increments-for-Target-Multiples-in-an-Array/README.md new file mode 100755 index 000000000..3b1616836 --- /dev/null +++ b/leetcode/3401-3500/3444.Minimum-Increments-for-Target-Multiples-in-an-Array/README.md @@ -0,0 +1,32 @@ +# [3444.Minimum Increments for Target Multiples 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 +> ... +Minimum Increments for Target Multiples in an Array +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/minimum-increments-for-target-multiples-in-an-array/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3444.Minimum-Increments-for-Target-Multiples-in-an-Array/Solution.go b/leetcode/3401-3500/3444.Minimum-Increments-for-Target-Multiples-in-an-Array/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3444.Minimum-Increments-for-Target-Multiples-in-an-Array/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3444.Minimum-Increments-for-Target-Multiples-in-an-Array/Solution_test.go b/leetcode/3401-3500/3444.Minimum-Increments-for-Target-Multiples-in-an-Array/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3444.Minimum-Increments-for-Target-Multiples-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/3401-3500/3445.Maximum-Difference-Between-Even-and-Odd-Frequency-II/README.md b/leetcode/3401-3500/3445.Maximum-Difference-Between-Even-and-Odd-Frequency-II/README.md new file mode 100755 index 000000000..56b30adc6 --- /dev/null +++ b/leetcode/3401-3500/3445.Maximum-Difference-Between-Even-and-Odd-Frequency-II/README.md @@ -0,0 +1,32 @@ +# [3445.Maximum Difference Between Even and Odd Frequency 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 Difference Between Even and Odd Frequency II +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximum-difference-between-even-and-odd-frequency-ii/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3445.Maximum-Difference-Between-Even-and-Odd-Frequency-II/Solution.go b/leetcode/3401-3500/3445.Maximum-Difference-Between-Even-and-Odd-Frequency-II/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3445.Maximum-Difference-Between-Even-and-Odd-Frequency-II/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3445.Maximum-Difference-Between-Even-and-Odd-Frequency-II/Solution_test.go b/leetcode/3401-3500/3445.Maximum-Difference-Between-Even-and-Odd-Frequency-II/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3445.Maximum-Difference-Between-Even-and-Odd-Frequency-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/3401-3500/3446.Sort-Matrix-by-Diagonals/README.md b/leetcode/3401-3500/3446.Sort-Matrix-by-Diagonals/README.md new file mode 100755 index 000000000..fb7e4c0d7 --- /dev/null +++ b/leetcode/3401-3500/3446.Sort-Matrix-by-Diagonals/README.md @@ -0,0 +1,32 @@ +# [3446.Sort Matrix by Diagonals][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 +> ... +Sort Matrix by Diagonals +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/sort-matrix-by-diagonals/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3446.Sort-Matrix-by-Diagonals/Solution.go b/leetcode/3401-3500/3446.Sort-Matrix-by-Diagonals/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3446.Sort-Matrix-by-Diagonals/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3446.Sort-Matrix-by-Diagonals/Solution_test.go b/leetcode/3401-3500/3446.Sort-Matrix-by-Diagonals/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3446.Sort-Matrix-by-Diagonals/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/3401-3500/3447.Assign-Elements-to-Groups-with-Constraints/README.md b/leetcode/3401-3500/3447.Assign-Elements-to-Groups-with-Constraints/README.md new file mode 100755 index 000000000..78f003eca --- /dev/null +++ b/leetcode/3401-3500/3447.Assign-Elements-to-Groups-with-Constraints/README.md @@ -0,0 +1,32 @@ +# [3447.Assign Elements to Groups with Constraints][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 +> ... +Assign Elements to Groups with Constraints +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/assign-elements-to-groups-with-constraints/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3447.Assign-Elements-to-Groups-with-Constraints/Solution.go b/leetcode/3401-3500/3447.Assign-Elements-to-Groups-with-Constraints/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3447.Assign-Elements-to-Groups-with-Constraints/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3447.Assign-Elements-to-Groups-with-Constraints/Solution_test.go b/leetcode/3401-3500/3447.Assign-Elements-to-Groups-with-Constraints/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3447.Assign-Elements-to-Groups-with-Constraints/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/3401-3500/3448.Count-Substrings-Divisible-By-Last-Digit/README.md b/leetcode/3401-3500/3448.Count-Substrings-Divisible-By-Last-Digit/README.md new file mode 100755 index 000000000..d4cab6efb --- /dev/null +++ b/leetcode/3401-3500/3448.Count-Substrings-Divisible-By-Last-Digit/README.md @@ -0,0 +1,32 @@ +# [3448.Count Substrings Divisible By Last Digit][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 Divisible By Last Digit +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/count-substrings-divisible-by-last-digit/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3448.Count-Substrings-Divisible-By-Last-Digit/Solution.go b/leetcode/3401-3500/3448.Count-Substrings-Divisible-By-Last-Digit/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3448.Count-Substrings-Divisible-By-Last-Digit/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3448.Count-Substrings-Divisible-By-Last-Digit/Solution_test.go b/leetcode/3401-3500/3448.Count-Substrings-Divisible-By-Last-Digit/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3448.Count-Substrings-Divisible-By-Last-Digit/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/3401-3500/3449.Maximize-the-Minimum-Game-Score/README.md b/leetcode/3401-3500/3449.Maximize-the-Minimum-Game-Score/README.md new file mode 100755 index 000000000..f0d2d03ac --- /dev/null +++ b/leetcode/3401-3500/3449.Maximize-the-Minimum-Game-Score/README.md @@ -0,0 +1,32 @@ +# [3449.Maximize the Minimum Game Score][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 Minimum Game Score +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximize-the-minimum-game-score/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3449.Maximize-the-Minimum-Game-Score/Solution.go b/leetcode/3401-3500/3449.Maximize-the-Minimum-Game-Score/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3449.Maximize-the-Minimum-Game-Score/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3449.Maximize-the-Minimum-Game-Score/Solution_test.go b/leetcode/3401-3500/3449.Maximize-the-Minimum-Game-Score/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3449.Maximize-the-Minimum-Game-Score/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/3401-3500/3452.Sum-of-Good-Numbers/README.md b/leetcode/3401-3500/3452.Sum-of-Good-Numbers/README.md new file mode 100755 index 000000000..03a6c84c4 --- /dev/null +++ b/leetcode/3401-3500/3452.Sum-of-Good-Numbers/README.md @@ -0,0 +1,32 @@ +# [3452.Sum of Good Numbers][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 Numbers +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/sum-of-good-numbers/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3452.Sum-of-Good-Numbers/Solution.go b/leetcode/3401-3500/3452.Sum-of-Good-Numbers/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3452.Sum-of-Good-Numbers/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3452.Sum-of-Good-Numbers/Solution_test.go b/leetcode/3401-3500/3452.Sum-of-Good-Numbers/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3452.Sum-of-Good-Numbers/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/3401-3500/3453.Separate-Squares-I/README.md b/leetcode/3401-3500/3453.Separate-Squares-I/README.md new file mode 100755 index 000000000..794dcf531 --- /dev/null +++ b/leetcode/3401-3500/3453.Separate-Squares-I/README.md @@ -0,0 +1,32 @@ +# [3453.Separate Squares 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 +> ... +Separate Squares I +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/separate-squares-i/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3453.Separate-Squares-I/Solution.go b/leetcode/3401-3500/3453.Separate-Squares-I/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3453.Separate-Squares-I/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3453.Separate-Squares-I/Solution_test.go b/leetcode/3401-3500/3453.Separate-Squares-I/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3453.Separate-Squares-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/3401-3500/3454.Separate-Squares-II/README.md b/leetcode/3401-3500/3454.Separate-Squares-II/README.md new file mode 100755 index 000000000..d205b8258 --- /dev/null +++ b/leetcode/3401-3500/3454.Separate-Squares-II/README.md @@ -0,0 +1,32 @@ +# [3454.Separate Squares 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 +> ... +Separate Squares II +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/separate-squares-ii/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3454.Separate-Squares-II/Solution.go b/leetcode/3401-3500/3454.Separate-Squares-II/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3454.Separate-Squares-II/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3454.Separate-Squares-II/Solution_test.go b/leetcode/3401-3500/3454.Separate-Squares-II/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3454.Separate-Squares-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/3401-3500/3455.Shortest-Matching-Substring/README.md b/leetcode/3401-3500/3455.Shortest-Matching-Substring/README.md new file mode 100755 index 000000000..b0cd38e6f --- /dev/null +++ b/leetcode/3401-3500/3455.Shortest-Matching-Substring/README.md @@ -0,0 +1,32 @@ +# [3455.Shortest Matching 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 +> ... +Shortest Matching Substring +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/shortest-matching-substring/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3455.Shortest-Matching-Substring/Solution.go b/leetcode/3401-3500/3455.Shortest-Matching-Substring/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3455.Shortest-Matching-Substring/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3455.Shortest-Matching-Substring/Solution_test.go b/leetcode/3401-3500/3455.Shortest-Matching-Substring/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3455.Shortest-Matching-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/3401-3500/3456.Find-Special-Substring-of-Length-K/README.md b/leetcode/3401-3500/3456.Find-Special-Substring-of-Length-K/README.md new file mode 100755 index 000000000..3cae3c348 --- /dev/null +++ b/leetcode/3401-3500/3456.Find-Special-Substring-of-Length-K/README.md @@ -0,0 +1,32 @@ +# [3456.Find Special Substring of Length 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 +> ... +Find Special Substring of Length K +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/find-special-substring-of-length-k/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3456.Find-Special-Substring-of-Length-K/Solution.go b/leetcode/3401-3500/3456.Find-Special-Substring-of-Length-K/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3456.Find-Special-Substring-of-Length-K/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3456.Find-Special-Substring-of-Length-K/Solution_test.go b/leetcode/3401-3500/3456.Find-Special-Substring-of-Length-K/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3456.Find-Special-Substring-of-Length-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/3401-3500/3457.Eat-Pizzas!/README.md b/leetcode/3401-3500/3457.Eat-Pizzas!/README.md new file mode 100755 index 000000000..03ffb10ad --- /dev/null +++ b/leetcode/3401-3500/3457.Eat-Pizzas!/README.md @@ -0,0 +1,32 @@ +# [3457.Eat Pizzas!][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 +> ... +Eat Pizzas! +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/eat-pizzas/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3457.Eat-Pizzas!/Solution.go b/leetcode/3401-3500/3457.Eat-Pizzas!/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3457.Eat-Pizzas!/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3457.Eat-Pizzas!/Solution_test.go b/leetcode/3401-3500/3457.Eat-Pizzas!/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3457.Eat-Pizzas!/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/3401-3500/3458.Select-K-Disjoint-Special-Substrings/README.md b/leetcode/3401-3500/3458.Select-K-Disjoint-Special-Substrings/README.md new file mode 100755 index 000000000..17691cdc9 --- /dev/null +++ b/leetcode/3401-3500/3458.Select-K-Disjoint-Special-Substrings/README.md @@ -0,0 +1,32 @@ +# [3458.Select K Disjoint Special Substrings][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 +> ... +Select K Disjoint Special Substrings +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/select-k-disjoint-special-substrings/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3458.Select-K-Disjoint-Special-Substrings/Solution.go b/leetcode/3401-3500/3458.Select-K-Disjoint-Special-Substrings/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3458.Select-K-Disjoint-Special-Substrings/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3458.Select-K-Disjoint-Special-Substrings/Solution_test.go b/leetcode/3401-3500/3458.Select-K-Disjoint-Special-Substrings/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3458.Select-K-Disjoint-Special-Substrings/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/3401-3500/3459.Length-of-Longest-V-Shaped-Diagonal-Segment/README.md b/leetcode/3401-3500/3459.Length-of-Longest-V-Shaped-Diagonal-Segment/README.md new file mode 100755 index 000000000..a26b414ce --- /dev/null +++ b/leetcode/3401-3500/3459.Length-of-Longest-V-Shaped-Diagonal-Segment/README.md @@ -0,0 +1,32 @@ +# [3459.Length of Longest V-Shaped Diagonal Segment][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 +> ... +Length of Longest V-Shaped Diagonal Segment +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/length-of-longest-v-shaped-diagonal-segment/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3459.Length-of-Longest-V-Shaped-Diagonal-Segment/Solution.go b/leetcode/3401-3500/3459.Length-of-Longest-V-Shaped-Diagonal-Segment/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3459.Length-of-Longest-V-Shaped-Diagonal-Segment/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3459.Length-of-Longest-V-Shaped-Diagonal-Segment/Solution_test.go b/leetcode/3401-3500/3459.Length-of-Longest-V-Shaped-Diagonal-Segment/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3459.Length-of-Longest-V-Shaped-Diagonal-Segment/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/3401-3500/3461.Check-If-Digits-Are-Equal-in-String-After-Operations-I/README.md b/leetcode/3401-3500/3461.Check-If-Digits-Are-Equal-in-String-After-Operations-I/README.md new file mode 100755 index 000000000..ce9f8a897 --- /dev/null +++ b/leetcode/3401-3500/3461.Check-If-Digits-Are-Equal-in-String-After-Operations-I/README.md @@ -0,0 +1,32 @@ +# [3461.Check If Digits Are Equal in String After 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 +> ... +Check If Digits Are Equal in String After Operations I +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/check-if-digits-are-equal-in-string-after-operations-i/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3461.Check-If-Digits-Are-Equal-in-String-After-Operations-I/Solution.go b/leetcode/3401-3500/3461.Check-If-Digits-Are-Equal-in-String-After-Operations-I/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3461.Check-If-Digits-Are-Equal-in-String-After-Operations-I/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3461.Check-If-Digits-Are-Equal-in-String-After-Operations-I/Solution_test.go b/leetcode/3401-3500/3461.Check-If-Digits-Are-Equal-in-String-After-Operations-I/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3461.Check-If-Digits-Are-Equal-in-String-After-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/3401-3500/3462.Maximum-Sum-With-at-Most-K-Elements/README.md b/leetcode/3401-3500/3462.Maximum-Sum-With-at-Most-K-Elements/README.md new file mode 100755 index 000000000..ebcc64a3c --- /dev/null +++ b/leetcode/3401-3500/3462.Maximum-Sum-With-at-Most-K-Elements/README.md @@ -0,0 +1,32 @@ +# [3462.Maximum Sum With at Most K Elements][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 Sum With at Most K Elements +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximum-sum-with-at-most-k-elements/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3462.Maximum-Sum-With-at-Most-K-Elements/Solution.go b/leetcode/3401-3500/3462.Maximum-Sum-With-at-Most-K-Elements/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3462.Maximum-Sum-With-at-Most-K-Elements/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3462.Maximum-Sum-With-at-Most-K-Elements/Solution_test.go b/leetcode/3401-3500/3462.Maximum-Sum-With-at-Most-K-Elements/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3462.Maximum-Sum-With-at-Most-K-Elements/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/3401-3500/3463.Check-If-Digits-Are-Equal-in-String-After-Operations-II/README.md b/leetcode/3401-3500/3463.Check-If-Digits-Are-Equal-in-String-After-Operations-II/README.md new file mode 100755 index 000000000..f2e2d3a32 --- /dev/null +++ b/leetcode/3401-3500/3463.Check-If-Digits-Are-Equal-in-String-After-Operations-II/README.md @@ -0,0 +1,32 @@ +# [3463.Check If Digits Are Equal in String After 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 +> ... +Check If Digits Are Equal in String After Operations II +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/check-if-digits-are-equal-in-string-after-operations-ii/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3463.Check-If-Digits-Are-Equal-in-String-After-Operations-II/Solution.go b/leetcode/3401-3500/3463.Check-If-Digits-Are-Equal-in-String-After-Operations-II/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3463.Check-If-Digits-Are-Equal-in-String-After-Operations-II/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3463.Check-If-Digits-Are-Equal-in-String-After-Operations-II/Solution_test.go b/leetcode/3401-3500/3463.Check-If-Digits-Are-Equal-in-String-After-Operations-II/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3463.Check-If-Digits-Are-Equal-in-String-After-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/3401-3500/3464.Maximize-the-Distance-Between-Points-on-a-Square/README.md b/leetcode/3401-3500/3464.Maximize-the-Distance-Between-Points-on-a-Square/README.md new file mode 100755 index 000000000..ae0284c82 --- /dev/null +++ b/leetcode/3401-3500/3464.Maximize-the-Distance-Between-Points-on-a-Square/README.md @@ -0,0 +1,32 @@ +# [3464.Maximize the Distance Between Points on a Square][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 Distance Between Points on a Square +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximize-the-distance-between-points-on-a-square/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3464.Maximize-the-Distance-Between-Points-on-a-Square/Solution.go b/leetcode/3401-3500/3464.Maximize-the-Distance-Between-Points-on-a-Square/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3464.Maximize-the-Distance-Between-Points-on-a-Square/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3464.Maximize-the-Distance-Between-Points-on-a-Square/Solution_test.go b/leetcode/3401-3500/3464.Maximize-the-Distance-Between-Points-on-a-Square/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3464.Maximize-the-Distance-Between-Points-on-a-Square/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/3401-3500/3467.Transform-Array-by-Parity/README.md b/leetcode/3401-3500/3467.Transform-Array-by-Parity/README.md new file mode 100755 index 000000000..0dc913d62 --- /dev/null +++ b/leetcode/3401-3500/3467.Transform-Array-by-Parity/README.md @@ -0,0 +1,32 @@ +# [3467.Transform Array by Parity][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 +> ... +Transform Array by Parity +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/transform-array-by-parity/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3467.Transform-Array-by-Parity/Solution.go b/leetcode/3401-3500/3467.Transform-Array-by-Parity/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3467.Transform-Array-by-Parity/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3467.Transform-Array-by-Parity/Solution_test.go b/leetcode/3401-3500/3467.Transform-Array-by-Parity/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3467.Transform-Array-by-Parity/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/3401-3500/3468.Find-the-Number-of-Copy-Arrays/README.md b/leetcode/3401-3500/3468.Find-the-Number-of-Copy-Arrays/README.md new file mode 100755 index 000000000..bdd63ba5d --- /dev/null +++ b/leetcode/3401-3500/3468.Find-the-Number-of-Copy-Arrays/README.md @@ -0,0 +1,32 @@ +# [3468.Find the Number of Copy Arrays][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 Copy Arrays +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/find-the-number-of-copy-arrays/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3468.Find-the-Number-of-Copy-Arrays/Solution.go b/leetcode/3401-3500/3468.Find-the-Number-of-Copy-Arrays/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3468.Find-the-Number-of-Copy-Arrays/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3468.Find-the-Number-of-Copy-Arrays/Solution_test.go b/leetcode/3401-3500/3468.Find-the-Number-of-Copy-Arrays/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3468.Find-the-Number-of-Copy-Arrays/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/3401-3500/3469.Find-Minimum-Cost-to-Remove-Array-Elements/README.md b/leetcode/3401-3500/3469.Find-Minimum-Cost-to-Remove-Array-Elements/README.md new file mode 100755 index 000000000..4c9dd3ed7 --- /dev/null +++ b/leetcode/3401-3500/3469.Find-Minimum-Cost-to-Remove-Array-Elements/README.md @@ -0,0 +1,32 @@ +# [3469.Find Minimum Cost to Remove Array Elements][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 Cost to Remove Array Elements +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/find-minimum-cost-to-remove-array-elements/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3469.Find-Minimum-Cost-to-Remove-Array-Elements/Solution.go b/leetcode/3401-3500/3469.Find-Minimum-Cost-to-Remove-Array-Elements/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3469.Find-Minimum-Cost-to-Remove-Array-Elements/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3469.Find-Minimum-Cost-to-Remove-Array-Elements/Solution_test.go b/leetcode/3401-3500/3469.Find-Minimum-Cost-to-Remove-Array-Elements/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3469.Find-Minimum-Cost-to-Remove-Array-Elements/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/3401-3500/3470.Permutations-IV/README.md b/leetcode/3401-3500/3470.Permutations-IV/README.md new file mode 100755 index 000000000..d805d4fd4 --- /dev/null +++ b/leetcode/3401-3500/3470.Permutations-IV/README.md @@ -0,0 +1,32 @@ +# [3470.Permutations IV][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 +> ... +Permutations IV +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/permutations-iv/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3470.Permutations-IV/Solution.go b/leetcode/3401-3500/3470.Permutations-IV/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3470.Permutations-IV/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3470.Permutations-IV/Solution_test.go b/leetcode/3401-3500/3470.Permutations-IV/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3470.Permutations-IV/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/3401-3500/3471.Find-the-Largest-Almost-Missing-Integer/README.md b/leetcode/3401-3500/3471.Find-the-Largest-Almost-Missing-Integer/README.md new file mode 100755 index 000000000..2fa3c652e --- /dev/null +++ b/leetcode/3401-3500/3471.Find-the-Largest-Almost-Missing-Integer/README.md @@ -0,0 +1,32 @@ +# [3471.Find the Largest Almost Missing Integer][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 Largest Almost Missing Integer +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/find-the-largest-almost-missing-integer/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3471.Find-the-Largest-Almost-Missing-Integer/Solution.go b/leetcode/3401-3500/3471.Find-the-Largest-Almost-Missing-Integer/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3471.Find-the-Largest-Almost-Missing-Integer/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3471.Find-the-Largest-Almost-Missing-Integer/Solution_test.go b/leetcode/3401-3500/3471.Find-the-Largest-Almost-Missing-Integer/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3471.Find-the-Largest-Almost-Missing-Integer/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/3401-3500/3472.Longest-Palindromic-Subsequence-After-at-Most-K-Operations/README.md b/leetcode/3401-3500/3472.Longest-Palindromic-Subsequence-After-at-Most-K-Operations/README.md new file mode 100755 index 000000000..bc11b83b4 --- /dev/null +++ b/leetcode/3401-3500/3472.Longest-Palindromic-Subsequence-After-at-Most-K-Operations/README.md @@ -0,0 +1,32 @@ +# [3472.Longest Palindromic Subsequence After at Most K 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 +> ... +Longest Palindromic Subsequence After at Most K Operations +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/longest-palindromic-subsequence-after-at-most-k-operations/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3472.Longest-Palindromic-Subsequence-After-at-Most-K-Operations/Solution.go b/leetcode/3401-3500/3472.Longest-Palindromic-Subsequence-After-at-Most-K-Operations/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3472.Longest-Palindromic-Subsequence-After-at-Most-K-Operations/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3472.Longest-Palindromic-Subsequence-After-at-Most-K-Operations/Solution_test.go b/leetcode/3401-3500/3472.Longest-Palindromic-Subsequence-After-at-Most-K-Operations/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3472.Longest-Palindromic-Subsequence-After-at-Most-K-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/3401-3500/3473.Sum-of-K-Subarrays-With-Length-at-Least-M/README.md b/leetcode/3401-3500/3473.Sum-of-K-Subarrays-With-Length-at-Least-M/README.md new file mode 100755 index 000000000..67bfa8aeb --- /dev/null +++ b/leetcode/3401-3500/3473.Sum-of-K-Subarrays-With-Length-at-Least-M/README.md @@ -0,0 +1,32 @@ +# [3473.Sum of K Subarrays With Length at Least M][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 K Subarrays With Length at Least M +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/sum-of-k-subarrays-with-length-at-least-m/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3473.Sum-of-K-Subarrays-With-Length-at-Least-M/Solution.go b/leetcode/3401-3500/3473.Sum-of-K-Subarrays-With-Length-at-Least-M/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3473.Sum-of-K-Subarrays-With-Length-at-Least-M/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3473.Sum-of-K-Subarrays-With-Length-at-Least-M/Solution_test.go b/leetcode/3401-3500/3473.Sum-of-K-Subarrays-With-Length-at-Least-M/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3473.Sum-of-K-Subarrays-With-Length-at-Least-M/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/3401-3500/3474.Lexicographically-Smallest-Generated-String/README.md b/leetcode/3401-3500/3474.Lexicographically-Smallest-Generated-String/README.md new file mode 100755 index 000000000..e231f5488 --- /dev/null +++ b/leetcode/3401-3500/3474.Lexicographically-Smallest-Generated-String/README.md @@ -0,0 +1,32 @@ +# [3474.Lexicographically Smallest Generated 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 +> ... +Lexicographically Smallest Generated String +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/lexicographically-smallest-generated-string/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3474.Lexicographically-Smallest-Generated-String/Solution.go b/leetcode/3401-3500/3474.Lexicographically-Smallest-Generated-String/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3474.Lexicographically-Smallest-Generated-String/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3474.Lexicographically-Smallest-Generated-String/Solution_test.go b/leetcode/3401-3500/3474.Lexicographically-Smallest-Generated-String/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3474.Lexicographically-Smallest-Generated-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/3401-3500/3477.Fruits-Into-Baskets-II/README.md b/leetcode/3401-3500/3477.Fruits-Into-Baskets-II/README.md new file mode 100755 index 000000000..cc2a2b90d --- /dev/null +++ b/leetcode/3401-3500/3477.Fruits-Into-Baskets-II/README.md @@ -0,0 +1,32 @@ +# [3477.Fruits Into Baskets 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 +> ... +Fruits Into Baskets II +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/fruits-into-baskets-ii/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3477.Fruits-Into-Baskets-II/Solution.go b/leetcode/3401-3500/3477.Fruits-Into-Baskets-II/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3477.Fruits-Into-Baskets-II/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3477.Fruits-Into-Baskets-II/Solution_test.go b/leetcode/3401-3500/3477.Fruits-Into-Baskets-II/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3477.Fruits-Into-Baskets-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/3401-3500/3478.Choose-K-Elements-With-Maximum-Sum/README.md b/leetcode/3401-3500/3478.Choose-K-Elements-With-Maximum-Sum/README.md new file mode 100755 index 000000000..a393e9cc6 --- /dev/null +++ b/leetcode/3401-3500/3478.Choose-K-Elements-With-Maximum-Sum/README.md @@ -0,0 +1,32 @@ +# [3478.Choose K Elements With Maximum 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 +> ... +Choose K Elements With Maximum Sum +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/choose-k-elements-with-maximum-sum/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3478.Choose-K-Elements-With-Maximum-Sum/Solution.go b/leetcode/3401-3500/3478.Choose-K-Elements-With-Maximum-Sum/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3478.Choose-K-Elements-With-Maximum-Sum/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3478.Choose-K-Elements-With-Maximum-Sum/Solution_test.go b/leetcode/3401-3500/3478.Choose-K-Elements-With-Maximum-Sum/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3478.Choose-K-Elements-With-Maximum-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/3401-3500/3479.Fruits-Into-Baskets-III/README.md b/leetcode/3401-3500/3479.Fruits-Into-Baskets-III/README.md new file mode 100755 index 000000000..74e955fec --- /dev/null +++ b/leetcode/3401-3500/3479.Fruits-Into-Baskets-III/README.md @@ -0,0 +1,32 @@ +# [3479.Fruits Into Baskets 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 +> ... +Fruits Into Baskets III +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/fruits-into-baskets-iii/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3479.Fruits-Into-Baskets-III/Solution.go b/leetcode/3401-3500/3479.Fruits-Into-Baskets-III/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3479.Fruits-Into-Baskets-III/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3479.Fruits-Into-Baskets-III/Solution_test.go b/leetcode/3401-3500/3479.Fruits-Into-Baskets-III/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3479.Fruits-Into-Baskets-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/3401-3500/3480.Maximize-Subarrays-After-Removing-One-Conflicting-Pair/README.md b/leetcode/3401-3500/3480.Maximize-Subarrays-After-Removing-One-Conflicting-Pair/README.md new file mode 100755 index 000000000..bda6af96f --- /dev/null +++ b/leetcode/3401-3500/3480.Maximize-Subarrays-After-Removing-One-Conflicting-Pair/README.md @@ -0,0 +1,32 @@ +# [3480.Maximize Subarrays After Removing One Conflicting Pair][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 Subarrays After Removing One Conflicting Pair +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximize-subarrays-after-removing-one-conflicting-pair/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3480.Maximize-Subarrays-After-Removing-One-Conflicting-Pair/Solution.go b/leetcode/3401-3500/3480.Maximize-Subarrays-After-Removing-One-Conflicting-Pair/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3480.Maximize-Subarrays-After-Removing-One-Conflicting-Pair/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3480.Maximize-Subarrays-After-Removing-One-Conflicting-Pair/Solution_test.go b/leetcode/3401-3500/3480.Maximize-Subarrays-After-Removing-One-Conflicting-Pair/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3480.Maximize-Subarrays-After-Removing-One-Conflicting-Pair/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/3401-3500/3483.Unique-3-Digit-Even-Numbers/README.md b/leetcode/3401-3500/3483.Unique-3-Digit-Even-Numbers/README.md new file mode 100755 index 000000000..27ea8c0dd --- /dev/null +++ b/leetcode/3401-3500/3483.Unique-3-Digit-Even-Numbers/README.md @@ -0,0 +1,32 @@ +# [3483.Unique 3-Digit Even Numbers][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 +> ... +Unique 3-Digit Even Numbers +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/unique-3-digit-even-numbers/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3483.Unique-3-Digit-Even-Numbers/Solution.go b/leetcode/3401-3500/3483.Unique-3-Digit-Even-Numbers/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3483.Unique-3-Digit-Even-Numbers/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3483.Unique-3-Digit-Even-Numbers/Solution_test.go b/leetcode/3401-3500/3483.Unique-3-Digit-Even-Numbers/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3483.Unique-3-Digit-Even-Numbers/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/3401-3500/3484.Design-Spreadsheet/README.md b/leetcode/3401-3500/3484.Design-Spreadsheet/README.md new file mode 100755 index 000000000..37eb8c215 --- /dev/null +++ b/leetcode/3401-3500/3484.Design-Spreadsheet/README.md @@ -0,0 +1,32 @@ +# [3484.Design Spreadsheet][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 +> ... +Design Spreadsheet +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/design-spreadsheet/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3484.Design-Spreadsheet/Solution.go b/leetcode/3401-3500/3484.Design-Spreadsheet/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3484.Design-Spreadsheet/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3484.Design-Spreadsheet/Solution_test.go b/leetcode/3401-3500/3484.Design-Spreadsheet/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3484.Design-Spreadsheet/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/3401-3500/3485.Longest-Common-Prefix-of-K-Strings-After-Removal/README.md b/leetcode/3401-3500/3485.Longest-Common-Prefix-of-K-Strings-After-Removal/README.md new file mode 100755 index 000000000..087d4dc38 --- /dev/null +++ b/leetcode/3401-3500/3485.Longest-Common-Prefix-of-K-Strings-After-Removal/README.md @@ -0,0 +1,32 @@ +# [3485.Longest Common Prefix of K Strings After Removal][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 +> ... +Longest Common Prefix of K Strings After Removal +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/longest-common-prefix-of-k-strings-after-removal/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3485.Longest-Common-Prefix-of-K-Strings-After-Removal/Solution.go b/leetcode/3401-3500/3485.Longest-Common-Prefix-of-K-Strings-After-Removal/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3485.Longest-Common-Prefix-of-K-Strings-After-Removal/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3485.Longest-Common-Prefix-of-K-Strings-After-Removal/Solution_test.go b/leetcode/3401-3500/3485.Longest-Common-Prefix-of-K-Strings-After-Removal/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3485.Longest-Common-Prefix-of-K-Strings-After-Removal/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/3401-3500/3486.Longest-Special-Path-II/README.md b/leetcode/3401-3500/3486.Longest-Special-Path-II/README.md new file mode 100755 index 000000000..a0dc9828d --- /dev/null +++ b/leetcode/3401-3500/3486.Longest-Special-Path-II/README.md @@ -0,0 +1,32 @@ +# [3486.Longest Special Path 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 +> ... +Longest Special Path II +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/longest-special-path-ii/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3486.Longest-Special-Path-II/Solution.go b/leetcode/3401-3500/3486.Longest-Special-Path-II/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3486.Longest-Special-Path-II/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3486.Longest-Special-Path-II/Solution_test.go b/leetcode/3401-3500/3486.Longest-Special-Path-II/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3486.Longest-Special-Path-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/3401-3500/3487.Maximum-Unique-Subarray-Sum-After-Deletion/README.md b/leetcode/3401-3500/3487.Maximum-Unique-Subarray-Sum-After-Deletion/README.md new file mode 100755 index 000000000..eca18aba2 --- /dev/null +++ b/leetcode/3401-3500/3487.Maximum-Unique-Subarray-Sum-After-Deletion/README.md @@ -0,0 +1,32 @@ +# [3487.Maximum Unique Subarray Sum After Deletion][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 Unique Subarray Sum After Deletion +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximum-unique-subarray-sum-after-deletion/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3487.Maximum-Unique-Subarray-Sum-After-Deletion/Solution.go b/leetcode/3401-3500/3487.Maximum-Unique-Subarray-Sum-After-Deletion/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3487.Maximum-Unique-Subarray-Sum-After-Deletion/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3487.Maximum-Unique-Subarray-Sum-After-Deletion/Solution_test.go b/leetcode/3401-3500/3487.Maximum-Unique-Subarray-Sum-After-Deletion/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3487.Maximum-Unique-Subarray-Sum-After-Deletion/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/3401-3500/3488.Closest-Equal-Element-Queries/README.md b/leetcode/3401-3500/3488.Closest-Equal-Element-Queries/README.md new file mode 100755 index 000000000..4a0c66674 --- /dev/null +++ b/leetcode/3401-3500/3488.Closest-Equal-Element-Queries/README.md @@ -0,0 +1,32 @@ +# [3488.Closest Equal Element 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 +> ... +Closest Equal Element Queries +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/closest-equal-element-queries/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3488.Closest-Equal-Element-Queries/Solution.go b/leetcode/3401-3500/3488.Closest-Equal-Element-Queries/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3488.Closest-Equal-Element-Queries/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3488.Closest-Equal-Element-Queries/Solution_test.go b/leetcode/3401-3500/3488.Closest-Equal-Element-Queries/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3488.Closest-Equal-Element-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/3401-3500/3489.Zero-Array-Transformation-IV/README.md b/leetcode/3401-3500/3489.Zero-Array-Transformation-IV/README.md new file mode 100755 index 000000000..cbce44f59 --- /dev/null +++ b/leetcode/3401-3500/3489.Zero-Array-Transformation-IV/README.md @@ -0,0 +1,32 @@ +# [3489.Zero Array Transformation IV][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 IV +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/zero-array-transformation-iv/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3489.Zero-Array-Transformation-IV/Solution.go b/leetcode/3401-3500/3489.Zero-Array-Transformation-IV/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3489.Zero-Array-Transformation-IV/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3489.Zero-Array-Transformation-IV/Solution_test.go b/leetcode/3401-3500/3489.Zero-Array-Transformation-IV/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3489.Zero-Array-Transformation-IV/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/3401-3500/3490.Count-Beautiful-Numbers/README.md b/leetcode/3401-3500/3490.Count-Beautiful-Numbers/README.md new file mode 100755 index 000000000..60f655373 --- /dev/null +++ b/leetcode/3401-3500/3490.Count-Beautiful-Numbers/README.md @@ -0,0 +1,32 @@ +# [3490.Count Beautiful Numbers][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 Numbers +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/count-beautiful-numbers/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3490.Count-Beautiful-Numbers/Solution.go b/leetcode/3401-3500/3490.Count-Beautiful-Numbers/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3490.Count-Beautiful-Numbers/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3490.Count-Beautiful-Numbers/Solution_test.go b/leetcode/3401-3500/3490.Count-Beautiful-Numbers/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3490.Count-Beautiful-Numbers/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/3401-3500/3492.Maximum-Containers-on-a-Ship/README.md b/leetcode/3401-3500/3492.Maximum-Containers-on-a-Ship/README.md new file mode 100755 index 000000000..28a243ba9 --- /dev/null +++ b/leetcode/3401-3500/3492.Maximum-Containers-on-a-Ship/README.md @@ -0,0 +1,32 @@ +# [3492.Maximum Containers on a Ship][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 Containers on a Ship +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximum-containers-on-a-ship/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3492.Maximum-Containers-on-a-Ship/Solution.go b/leetcode/3401-3500/3492.Maximum-Containers-on-a-Ship/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3492.Maximum-Containers-on-a-Ship/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3492.Maximum-Containers-on-a-Ship/Solution_test.go b/leetcode/3401-3500/3492.Maximum-Containers-on-a-Ship/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3492.Maximum-Containers-on-a-Ship/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/3401-3500/3493.Properties-Graph/README.md b/leetcode/3401-3500/3493.Properties-Graph/README.md new file mode 100755 index 000000000..0a84bb7b2 --- /dev/null +++ b/leetcode/3401-3500/3493.Properties-Graph/README.md @@ -0,0 +1,32 @@ +# [3493.Properties 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 +> ... +Properties Graph +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/properties-graph/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3493.Properties-Graph/Solution.go b/leetcode/3401-3500/3493.Properties-Graph/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3493.Properties-Graph/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3493.Properties-Graph/Solution_test.go b/leetcode/3401-3500/3493.Properties-Graph/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3493.Properties-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/3401-3500/3494.Find-the-Minimum-Amount-of-Time-to-Brew-Potions/README.md b/leetcode/3401-3500/3494.Find-the-Minimum-Amount-of-Time-to-Brew-Potions/README.md new file mode 100755 index 000000000..8ce3f8c87 --- /dev/null +++ b/leetcode/3401-3500/3494.Find-the-Minimum-Amount-of-Time-to-Brew-Potions/README.md @@ -0,0 +1,32 @@ +# [3494.Find the Minimum Amount of Time to Brew Potions][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 Minimum Amount of Time to Brew Potions +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/find-the-minimum-amount-of-time-to-brew-potions/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3494.Find-the-Minimum-Amount-of-Time-to-Brew-Potions/Solution.go b/leetcode/3401-3500/3494.Find-the-Minimum-Amount-of-Time-to-Brew-Potions/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3494.Find-the-Minimum-Amount-of-Time-to-Brew-Potions/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3494.Find-the-Minimum-Amount-of-Time-to-Brew-Potions/Solution_test.go b/leetcode/3401-3500/3494.Find-the-Minimum-Amount-of-Time-to-Brew-Potions/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3494.Find-the-Minimum-Amount-of-Time-to-Brew-Potions/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/3401-3500/3495.Minimum-Operations-to-Make-Array-Elements-Zero/README.md b/leetcode/3401-3500/3495.Minimum-Operations-to-Make-Array-Elements-Zero/README.md new file mode 100755 index 000000000..f816cddd9 --- /dev/null +++ b/leetcode/3401-3500/3495.Minimum-Operations-to-Make-Array-Elements-Zero/README.md @@ -0,0 +1,32 @@ +# [3495.Minimum Operations to Make Array Elements 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 +> ... +Minimum Operations to Make Array Elements Zero +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/minimum-operations-to-make-array-elements-zero/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3495.Minimum-Operations-to-Make-Array-Elements-Zero/Solution.go b/leetcode/3401-3500/3495.Minimum-Operations-to-Make-Array-Elements-Zero/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3495.Minimum-Operations-to-Make-Array-Elements-Zero/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3495.Minimum-Operations-to-Make-Array-Elements-Zero/Solution_test.go b/leetcode/3401-3500/3495.Minimum-Operations-to-Make-Array-Elements-Zero/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3495.Minimum-Operations-to-Make-Array-Elements-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/3401-3500/3498.Reverse-Degree-of-a-String/README.md b/leetcode/3401-3500/3498.Reverse-Degree-of-a-String/README.md new file mode 100755 index 000000000..879a53df8 --- /dev/null +++ b/leetcode/3401-3500/3498.Reverse-Degree-of-a-String/README.md @@ -0,0 +1,32 @@ +# [3498.Reverse Degree of a 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 +> ... +Reverse Degree of a String +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/reverse-degree-of-a-string/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3498.Reverse-Degree-of-a-String/Solution.go b/leetcode/3401-3500/3498.Reverse-Degree-of-a-String/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3498.Reverse-Degree-of-a-String/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3498.Reverse-Degree-of-a-String/Solution_test.go b/leetcode/3401-3500/3498.Reverse-Degree-of-a-String/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3498.Reverse-Degree-of-a-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/3401-3500/3499.Maximize-Active-Section-with-Trade-I/README.md b/leetcode/3401-3500/3499.Maximize-Active-Section-with-Trade-I/README.md new file mode 100755 index 000000000..eeffb8010 --- /dev/null +++ b/leetcode/3401-3500/3499.Maximize-Active-Section-with-Trade-I/README.md @@ -0,0 +1,32 @@ +# [3499.Maximize Active Section with Trade 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 Active Section with Trade I +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximize-active-section-with-trade-i/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3499.Maximize-Active-Section-with-Trade-I/Solution.go b/leetcode/3401-3500/3499.Maximize-Active-Section-with-Trade-I/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3499.Maximize-Active-Section-with-Trade-I/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3499.Maximize-Active-Section-with-Trade-I/Solution_test.go b/leetcode/3401-3500/3499.Maximize-Active-Section-with-Trade-I/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3499.Maximize-Active-Section-with-Trade-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/3401-3500/3500.Minimum-Cost-to-Divide-Array-Into-Subarrays/README.md b/leetcode/3401-3500/3500.Minimum-Cost-to-Divide-Array-Into-Subarrays/README.md new file mode 100755 index 000000000..9e6a99d53 --- /dev/null +++ b/leetcode/3401-3500/3500.Minimum-Cost-to-Divide-Array-Into-Subarrays/README.md @@ -0,0 +1,32 @@ +# [3500.Minimum Cost to Divide Array Into Subarrays][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 Cost to Divide Array Into Subarrays +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/minimum-cost-to-divide-array-into-subarrays/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3401-3500/3500.Minimum-Cost-to-Divide-Array-Into-Subarrays/Solution.go b/leetcode/3401-3500/3500.Minimum-Cost-to-Divide-Array-Into-Subarrays/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3401-3500/3500.Minimum-Cost-to-Divide-Array-Into-Subarrays/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3401-3500/3500.Minimum-Cost-to-Divide-Array-Into-Subarrays/Solution_test.go b/leetcode/3401-3500/3500.Minimum-Cost-to-Divide-Array-Into-Subarrays/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3401-3500/3500.Minimum-Cost-to-Divide-Array-Into-Subarrays/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() { +}