C++ Challenge: permutations

  • (2 Pages)
  • +
  • 1
  • 2

15 Replies - 20488 Views - Last Post: 14 January 2012 - 04:33 PM

#16 Ricky65  Icon User is offline

  • D.I.C Head

Reputation: 38
  • View blog
  • Posts: 115
  • Joined: 03-June 10

Re: C++ Challenge: permutations

Posted 14 January 2012 - 04:33 PM

This paper by C++ Standard Committee member Howard Hinnant (great guy - replied to a few of my Stack Overflow questions on C++) is requisite reading for those interested in combinations and permutations.

He has a very efficient "for_each_permutation" algorithm which has better performance (orders of magnitude faster) than std::next/prev_permutation and it supports partial permutations. He also has algorithms for reversible and circular permutations. These are some of the hardest algorithms I've ever seen so he has my total respect.
Was This Post Helpful? 3
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2