LeetCode-Feedback / LeetCode-Feedback

675 stars 332 forks source link

[BUG] - 31. Next Permutation #24368

Closed lichenbo closed 1 month ago

lichenbo commented 1 month ago

LeetCode Username

lichenbo

Problem Number, Title, and Link

  1. Next Permutation https://leetcode.com/problems/next-permutation

Bug Category

Editorial

Bug Description

In the Complexity Analysis section, it writes 'Time complexity : O(n). In worst case, only two scans of the whole array are needed.'

There should be 3 scans instead of 2. 2 scans are performed during finding the elements to swap, and 1 scan for doing the reverse operation.

Language Used for Code

C++

Code used for Submit/Run operation

No response

Expected behavior

N/A

Screenshots

No response

Additional context

No response

exalate-issue-sync[bot] commented 1 month ago

LeetCode Support commented: Hello,

Your reported issue has been relayed to our team for thorough investigation. We appreciate your patience as we work to address and resolve this matter. We will reach out to you when we have updates regarding the issue.

If you have any further questions or concerns in the meantime, please feel free to let us know.

Best regards, LeetCode Support Team

exalate-issue-sync[bot] commented 1 month ago

Epiphania_Ekenimoh commented: Thank you for your time.

Your feedback has been used to enhance the problem. As a token of our appreciation, your LeetCode account has been credited with 100 LeetCoins.

If you have any more questions or additional feedback, please don't hesitate to let us know. Your continued support is invaluable to us!

Best regards, The LeetCode Team