Skip to main content

Questions tagged [permutations]

A permutation is a particular ordering of some list of objects. Problems tagged with permutation usually involve finding or generating permutations, including anagrams of text.

3 votes
18 answers
324 views

Check if two lists are permutations of each other [duplicate]

Challenge Given two lists of equal length, find if one of them is a permutation of the other. Output truthy or falsy values, or 1 or 0. Test case Examples ...
Andy Liu's user avatar
  • 121
8 votes
8 answers
1k views

Find the child anagrams of a word

Select any word from https://websites.umich.edu/~jlawler/wordlist with length greater than 1. For each letter on that word, remove it and check if any rearrangement of the remaining letters is present ...
enzo's user avatar
  • 2,093
10 votes
16 answers
1k views

Numbers with distinct decimal digits

Write a program or function that outputs all positive integers with distinct decimal digits (OEIS: A010784) Examples: ...
bsoelch's user avatar
  • 6,035
15 votes
18 answers
2k views

First odd then even indices

Your task is to find out how often you need to "shuffle" a given list with the following operation until you get back the original list. ...
bsoelch's user avatar
  • 6,035
16 votes
17 answers
1k views

Count N-Rich Permutations of an Integer Sequence

Given a sequence of integers with length \$L\$ and an integer \$1 \le N \le L\$, an "\$N\$-rich" permutation is one whose the longest strictly increasing contiguous subsequence has length ...
EphraimRuttenberg's user avatar