Skip to content
This repository has been archived by the owner on Apr 26, 2023. It is now read-only.

loligans/phonepad-puzzle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Description

This numerical puzzle originates from the Turkish Intelligence Foundation sent to Will Shortz by Turkish puzzler Metin Orsel.

No crossing digits - Valid Crossing digits - Valid Reusing digits - Invalid
phonepad no crossing phonepad crossing phonepad crossing
125 + 478 = 690 (false) 152 + 478 = 690 (false) 125 + 485 = 690 (Invalid)

How it works

  1. First you start with a any digit on a telephone keypad.
  2. Then you move to another digit adjacent from the previous digit either: horizontally, vertically or diagonally.
  3. Continue the process until you have 9-digits total.
  4. When you have collected your 9-digits the number formed from the first 3-digits plus the second 3-digits will equal the last 3-digits.

Requirements

  • You may not use the same digit more than once.
  • You may only use digits adjacent to each other.

Extra

Optional: To make things more difficult check to make sure adjacent digits do not cross paths.

Projects

This repository contains the solution to the phonepad problem in 2-languages: C++ and Typescript. To figure out how to build and run the projects continue reading below. I highly recommend you try to solve this problem yourself first.

C++

This project assumes cmake and make are on your PATH variable.

  1. Open a command/terminal window in the project root directory.
  2. enter cd .cmake; cmake .; make

Typescript

This project assumes you have Node.js, NPM, and Gulp installed globally.

  1. Open a command/terminal window in the project root directory.
  2. enter npm install; gulp start