APL Quest 2021 Problems
Write a function that has a right argument that is a non-empty character vector representing a DNA string and returns the percentage of GC-content in the string.
Write a function that behaves like the APL
index-of function `R←X⍳Y` except that it returns `0` instead of `1+≢X` for elements of `Y` not found in `X`.
Write a function that finds which elements of
Y
are multiples of each element of
X
and returns them as a vector (in the order of
X
) of vectors (in the order of
Y
).
Write a function which returns a numeric array of the same shape as the right argument representing the difference between the areas of the circles and the areas of the largest squares that can be inscribed within each circle.
Write a function that has a right argument which is a positive integer less than or equal to 1,000,000 and returns a 2-element integer vector representing the rows and columns of the most square rectangle such that the number product of the number of rows and columns equals the argument.
Write a function that as a character vector right argument that is a permutation of 'KQRRBBNN' and returns 1 if the K is between the two Rs and the Bs occupy one odd and one even position; and otherwise returns a 0.
Write a function to test whether an array is a magic square.
Write a function that returns the number of minutes between two timestamps.
Write a function that returns an integer singleton that represents the highest number of consecutive days where the price increased, decreased, or remained the same, relative to the previous day.
Write a function that returns a right-aligned character array with restricted width.