Keyboard Knights of Acacia

Are you ready for a challenge?

Complete this puzzle and show us that you’re ready for world-class work. If your solution shows true talent, you may get an opportunity to join our team.

We want to see how you approach solving problems with the C++ language, or your preferred programming language.

It is essential that the outcome provides a correct solution to the problem, but of course there are many ways to correctly solve the problem.

Your challenge

Count all 10-key sequences, given these constraints:

  • can start at any key
  • each subsequent move must be a knight move
  • no more than 2 vowels per sequence
  • repeat keys are allowed
  • no topological wrapping of keyboard
 

Keyboard layout:

How to submit your solution

  • Use your favourite programming language to solve the puzzle
  • Acacia’s preferred language is C++. If you choose to solve the puzzle with C++, please use a single .cpp file with compilation command (either GCC or clang) in a comment at the top of the file
  • Compile with -Wpedantic and as recent a version of C++ as you like, e.g. -std=c++20
  • Write simple, clean code that is fit for peer review
  • Submit your code below.  Ensure that you submit your full name and a mobile phone contact number.