Skip to content
Discussion options

You must be logged in to vote

@LPenny-github

你好 😊


nums1 和 nums2 我猶豫很久,還是不知如何命名,因此沒有為他們改名 orz

能理解 😅

可以考慮:

  • nums1: inputNumbers
    • 因為最後 output 是由「一一處理此 array 的成員」而來,所以對應到 inputNumbers
  • nums2: nextGreaterNumberCandidates
    • nextGreaterNumber 的候選者」

        Stack<int> nextGreaterNumber = new Stack<int>();

可以考慮:

  • nextGreaterNumberStack
  • nextGreaterNumberCandidateStack

        Dictionary<int, int> validPair = new Dictionary<int, int>();

可以考慮:

  • nextGreaterNumbers
  • nextGreaterNumberTable
  • nextGreaterNumberLookupTable

Replies: 1 comment 1 reply

Comment options

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

Answer selected by LPenny-github
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