Weekly Challenges

Solve the challenge, share your solution and summit the ranks of our Community!

Also available in | Français | Português | Español | 日本語
IDEAS WANTED

Want to get involved? We're always looking for ideas and content for Weekly Challenges.

SUBMIT YOUR IDEA

Challenge #270: Pony Permutations

caitlynmcintyre
9 - Comet
Spoiler
caitlynmcintyre_1-1623395244163.png

 

baby's first challenge 😕

 

DawnDuong
13 - Pulsar
13 - Pulsar

The "static" solution is easy enough, but the "dynamic" solution took me longer than expected. It's a good challenge to refresh knowledge of the dynamic tool. Thank you @mst3k  for submitting this challenge.

Jean-Balteryx
16 - Nebula
16 - Nebula

Here is my solution !

kelly_gilbert
13 - Pulsar

I went with an iterative macro to dynamically handle different numbers of horses.

 

Spoiler
Extra credit:
The number of possible outcomes is n! (n factorial). So, if there were five horses, the number of outcomes would be 5! = 5 x 4 x 3 x 2 x 1 = 120.


Outer workflow:

kelly_gilbert_1-1623555247250.png

 


Iterative macro:
This seems way too long to do something so simple, however, removing the duplicates (e.g. horse 1 = horse 2) after each iteration was MUCH faster than removing them after all of the iterations completed (because those unnecessary records multiply quickly!)

kelly_gilbert_0-1623555107685.png
Assaf_m
11 - Bolide

My Solution Attached

 

 

Spoiler
Assaf_m_1-1623656167059.png

 

Pkoziol
6 - Meteoroid

Simple solution. It can be enhanced with Loops and Indexing to be dynamic and more robust.

Spoiler
Pkoziol_0-1623664962117.pngPkoziol_1-1623665172452.png

 

 

TonyAdam
8 - Asteroid

The extra credit was easy, but I though and hoped there would be a more elegant solution to the main task... :S

 

Spoiler
tonyadam_0-1623689768820.png


Extra credit: 5! = 120, n!

rmassambane
10 - Fireball

With his brim pulled way down low

millerbp
8 - Asteroid
Spoiler
Capture.PNG
JLdG
6 - Meteoroid

Had to get some inspiration from others for this one

 

 

Spoiler
JLdG_0-1624348511364.png