Skip to content

修改problems/kamacoder/0044.开发商购买土地.md中的python优化暴力代码#2967

Open
foreverxiaoyu wants to merge 1 commit intoyoungyangyang04:masterfrom
foreverxiaoyu:master
Open

修改problems/kamacoder/0044.开发商购买土地.md中的python优化暴力代码#2967
foreverxiaoyu wants to merge 1 commit intoyoungyangyang04:masterfrom
foreverxiaoyu:master

Conversation

@foreverxiaoyu
Copy link

无需遍历到最后一行(列),因为切分线始终在行(列)之间。
对于行和列切分那两层循环,时间复杂度从O(2nm)到O((n-1)m+n(m-1)),且取消了if判断,更加通俗易懂,执行效率高点。

无需遍历到最后一行,因为切分线始终在行之间。
对于行和列切分那两层循环,时间复杂度从O(2nm)到O((n-1)m+n(m-1),且取消了if判断,更加通俗易懂,执行效率高点。
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

Successfully merging this pull request may close these issues.

1 participant