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

763 PartitionLabels 时间复杂度 #236

Closed
0xff-dev opened this issue Mar 22, 2022 · 1 comment
Closed

763 PartitionLabels 时间复杂度 #236

0xff-dev opened this issue Mar 22, 2022 · 1 comment

Comments

@0xff-dev
Copy link

0xff-dev commented Mar 22, 2022

您好,昨天做到了这道题,然后和您这边的解法做了一个对比,都是lastIndex的逻辑。readme中写了复杂度是O(n^2),但解法1的start更新为end+1,我觉得时间复杂度是O(n)的。

@0xff-dev 0xff-dev changed the title 763 PartitionLabels 优化 763 PartitionLabels 时间复杂度 Mar 23, 2022
@halfrost
Copy link
Owner

@0xff-dev 你说的是对的,我这里写错了。感谢指出,我已经更正了。

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

2 participants