Skip to content

Có cách nào tối ưu hơn việc dùng swap thế này ? Vì thuật của bạn complex đã là O(n^2) rồi, giả sử n = 10^9 thì phải làm sao đây ?  #25

@m1nhn

Description

@m1nhn

Cbasic/bt_contro/b5.cpp

Lines 40 to 42 in 84ecf06

for (int i = 0; i < n-1; i++)
{
for (int j = i+1; j < n; j++)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions