Monday, July 26, 2021

What is time complexity of following code

        int count = 0;
        for (int i = N; i > 0; i /= 2) {
            for (int j = 0; j < i; j++) {
                count += 1;
            }
        }

Comments URL: https://news.ycombinator.com/item?id=27964120

Points: 1

# Comments: 0



from Hacker News: Newest https://ift.tt/2WcyK8b
via IFTTT

No comments:

Post a Comment

Ask HN: I had Codex and GPT 5.6 Sol running for 12 days, 870k+ LOC. Now what?

For the last 2 weeks I have been running Codex + GPT 5.6 Sol Ultra non-stop for almost 13 days, working on a huge extension to my SaaS prod...