Each Monday we share a new challenge from APL Quest – a collection of APL problems that test your array-thinking and highlight the expressive power of APL. These are all based on problems posed in the APL Problem Solving Competition over the years. The APL Wiki has more information on APL Quest.
If you missed any in October, here’s your chance to catch up and try them yourself
2013-1: Seems a Bit Odd To Me
APL Quest Link: 2013-1: Seems a Bit Odd To Me
Write a function to produce a vector of the first n odd numbers.
2013-2: Making The Grade
APL Quest Link: 2013-2: Making The Grade
Write a function which returns the percent (from 0 to 100) of passing (65 or higher) grades in a vector of grades.
2013-3: What Is In a Word
APL Quest Link: 2013-3: What Is In a Word
Write a function which returns the number of words in the given character scalar or vector.
For simplicity’s sake, you can consider the space character ' ' to be the only word separator.
2013-4: Keeping Things In Balance
APL Quest Link: 2013-4: Keeping Things In Balance
Write a function which returns a 1 if the opening and closing parentheses in a character vector are balanced, or a zero otherwise.
Try them yourself
All problems include sample solutions, explanations, and discussions. Visit APL Quest to browse the full archive.