All Questions
Tagged with open-ended-function array
6 questions
13
votes
10
answers
1k
views
Adjacent Items Sorting
Given a list, L, of sets of numbers like this:
[[1], [0,2,3], [3,1], [1,2,3]]
Output a single list of numbers such that 2 ...
15
votes
3
answers
379
views
What was my Wordle play?
Task
Given a winning Wordle play results (clues), the target ("secret") word and a list of words, output a possible sequence of words leading to such results.
The words in the list will be ...
16
votes
15
answers
1k
views
Encode integers with some others
Input a non-empty array of positive (greater than 0) integers. Output another non-empty array of positive integers which encode the input array. Output array does not use any numbers used in the input ...
16
votes
11
answers
2k
views
Generate a mantis's head (symmetrical triangle)
Given guaranteed strictly positive integers \$w\$ and \$n\$, output
An equilateral triangle array with side length \$w\$, filled with two distinct, consistent values. I'll call these ...
33
votes
10
answers
2k
views
Build a nest
The challenge is simple: write a program or function that, when given a finite non-negative integer, outputs a nested array.
The rules
Your code must produce a unique valid nested array for every ...
28
votes
71
answers
3k
views
Create an array with repeated numbers
Challenge
Your task in this question is to write a program or a named function which takes a positive integer n (greater than 0) as input via STDIN, ARGV or ...