Skip to content
Discussion options

You must be logged in to vote

@LPenny-github

你好 😊


            int count = 1;

這裡可以考慮用 subarrayLength ,呼應 LeetCode 原題中提到的 "subarray" 。


namespace Sandbox
{
    public class NamSumOfAllOddLengthSubarrayse

我猜想 "SumOfAllOddLengthSubarrays" 是取自 LeetCode 第 1588 題的標題;而這 class 名稱最前面的 "Nam", 最後面的 "e" 或許是 typo? 🤔 (可能是手誤而沒有把暫時性的名字 "Name" 取代乾淨?)


        public void Test1()
        public void Test2()
        public void Test3()

可以考慮以下兩種命名方式:

  • 測試案例來源
    • LeetCodeExample1
    • LeetCodeExample2
    • LeetCodeExample3
  • 測試案例性質
    • OddLengthInputArray
    • EvenLengthInputArray

可以參考看看 😊

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@LPenny-github
Comment options

Answer selected by LPenny-github
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants