Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

977 #10

Open
happysmile12321 opened this issue Feb 24, 2024 · 0 comments
Open

977 #10

happysmile12321 opened this issue Feb 24, 2024 · 0 comments

Comments

@happysmile12321
Copy link
Owner

happysmile12321 commented Feb 24, 2024

这道题的思路是,数组是有顺序的,那么从两端不断往中间靠拢就是一个从大到小的过程。
这道题比较坑的点在于两端的这些节点他们往中间移动时是一个从大到小的移动。也就是说,要不断把大区间变小,因此移动的那个节点是比较大的一端。

然后这道题还考了一个数组的反转,我直接用了两个变量来做。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant