Each Monday we share a challenge from APL Quest – a collection of APL problems that test your array-thinking and highlight the expressive power of APL. These were all originally set as problems in Phase 1 of the APL Problem Solving Competition, which ran from 2009-2023. The APL Wiki has more information on APL Quest.
These are the challenges that we shared throughout October – if you missed them, now is your chance to catch up! Follow our social media channels (#APLQuest) to stay up-to-date with our weekly challenges.
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 that 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 that 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 that 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.