Re: Seeking recursive solution to replace nested for-loops

From: Ryan <rgaffuri_at_cox.net>
Date: Fri, 20 Feb 2004 19:40:57 -0500
Message-ID: <GOxZb.9939$23.8686_at_lakeread04>


  1. the answer to this is on the internet. though not in pl/sql, but you can translate
  2. This is probably a homework assignment.

"Michelle Romano" <mromano_at_sensis.com> wrote in message news:aaba7f35.0402190919.31edd67f_at_posting.google.com...
> Working with PL/SQL and Oracle9i, I am looking for a better way to
> generate combinations of n objects taken k at a time:
> n!/k!(n-k)!
> I am currently using the nested for-loop concept, but it is very
> inefficient since the value of k can vary.
>
> Does anyone know of a recursive solution or a better iterative
> solution using PL/SQL? Even a code sample which demonstrates
> recursion would give me a good place to start.
>
> Thanks in advance for your help.
>
> Michelle
Received on Sat Feb 21 2004 - 01:40:57 CET

Original text of this message