Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Combinations calculation



  • Hi, I have to calculate all possibility of combinaition.
    I have a QStringList l;
    @
    QStringList l;
    l.append("12");
    l.append("1");
    l.append("123");
    @

    And i want at end
    111
    112
    113
    211
    212
    213

    but all size a variable l can be:
    QStringList l;
    l.append("12");
    l.append("13");
    l.append("123");
    l.append("124");
    ...

    Someone can help me to find an algotihms

    thx



  • Hi,
    Isn't this more like three for loops congregated in one?
    for (x.size....)
    etc, etc?



  • I try with for loops but is deficient..
    all dimentions are dynamic


Log in to reply