Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library
← Back to context

Comment by a115ltd

8 hours ago

Knowing the count also gives you a O(n) way of finding a solution.

1 comment

a115ltd

Reply

dragontamer  3 hours ago

No.

The number of valid permutations of 10 things is 10!. Reviewing all 10! Things is clearly exponential or even worse than exponential.

We can get the count of 10! pretty easily, far easier than trying all combinations manually.

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities