4 kyu
1 unique common number in every pair
53 of 80Zzudo
Description:
In this kata, you are given a prime number p
. Your goal is to generate an array of p² + p + 1
arrays, each consisting of p + 1
distinct numbers between 1
and p² + p + 1
included. This set of arrays is such that for any pair of arrays, they both have exactly one number in common.
For example, a valid output for p = 2
is:
[
[7,2,4],
[1,7,3],
[4,3,5],
[6,4,1],
[1,2,5],
[2,6,3],
[6,5,7]
]
The order of the output does not matter. The input range tested for this kata goes up to p = 31
.
Algorithms
Combinatorics
Arrays
Mathematics
Geometry
Similar Kata:
Stats:
Created | Jan 30, 2020 |
Published | Jan 31, 2020 |
Warriors Trained | 521 |
Total Skips | 16 |
Total Code Submissions | 680 |
Total Times Completed | 80 |
JavaScript Completions | 53 |
Python Completions | 32 |
Total Stars | 24 |
% of votes with a positive feedback rating | 93% of 21 |
Total "Very Satisfied" Votes | 19 |
Total "Somewhat Satisfied" Votes | 1 |
Total "Not Satisfied" Votes | 1 |
Total Rank Assessments | 5 |
Average Assessed Rank | 4 kyu |
Highest Assessed Rank | 3 kyu |
Lowest Assessed Rank | 5 kyu |