Skip to content

APL Quest 2014 Problems

2014-1: It Is All Right:

Write a function that takes the length of the legs of a triangle as its left argument, and the length of the hypotenuse as its right argument and returns 1 if the triangle is a right triangle, 0 otherwise.

2014-2: How Tweet It Is:

Write a function which takes a character vector and removes the interior vowels from each word.

2014-3: Tell a Fib:

Write a function that takes an integer right argument and returns that number of terms in the Fibonacci sequence.

2014-4: Space The Final Frontier:

Write a function that removes extraneous (leading, trailing, and multiple) spaces from a character vector.

2014-5: Mirror Mirror:

Write a function which returns a 1 if its character vector argument is a palindrome, 0 otherwise.

2014-6: Roll The Dice:

Write a function that takes an integer vector representing the sides of a number of dice and returns a 2 column matrix of the number of ways each possible total of the dice can be rolled.

2014-7: Revolutionary Thinking:

Write a function which takes the diameters of the stationary and mobile circles and returns the number of revolutions the mobile must traverse until the tangent points meet again.

2014-8: Go The Distance:

Write a function that returns the distance between two points in a space of any number of dimensions.

2014-9: Going Ballistic:

Write a function which calculates the distance (in meters) a projectile travels given an initial velocity in meters per second and a trajectory in degrees.

2014-10: Sales Are Up:

Write a function that returns the greatest percent month to month increase.