Top "Permutation" questions

A permutation is an arrangement of objects into a particular order.

JavaScript - Generating combinations from n arrays with m elements

I'm having trouble coming up with code to generate combinations from n number of arrays with m number of elements …

javascript permutation combinations
Remove redundant parentheses from an arithmetic expression

This is an interview question, for which I did not find any satisfactory answers on stackoverflow or outside. Problem statement: …

algorithm data-structures stack permutation
How to generate all permutations of a string in PHP?

I need an algorithm that return all possible combination of all characters in one string. I've tried: $langd = strlen($input); …

php string algorithm combinations permutation
Code to enumerate permutations in Scala

I coded a function to enumerate all permutations of a given list. What do you think of the code below? …

scala permutation
std::next_permutation Implementation Explanation

I was curious how std:next_permutation was implemented so I extracted the the gnu libstdc++ 4.7 version and sanitized the …

c++ c++11 permutation stl-algorithm lexicographic
permutations of a string using iteration

I'm trying to find permutation of a given string, but I want to use iteration. The recursive solution I found …

java permutation
The most elegant way to generate permutations in SQL server

Given a the following table: Index | Element --------------- 1 | A 2 | B 3 | C 4 | D We want to generate all the possible permutations (…

sql sql-server tsql permutation
How can I generate all permutations of an array in Perl?

What's the best (elegant, simple, efficient) way to generate all n! permutations of an array in perl? For example, if …

perl algorithm arrays permutation
How to generate a random permutation in Java?

What is the best way to generate a random permutation of n numbers? For example, say I have a set …

java algorithm random permutation
All possible permutations of a set of lists in Python

In Python I have a list of n lists, each with a variable number of elements. How can I create …

python list permutation