Giter Site home page Giter Site logo

breadth-first-search-word-chain-coding-solutions's Introduction

Breadth-First-Search-Word-Chain-Coding-Solutions

Word Chain Coding Exercise

Inspired by http://codekata.com/kata/kata19-word-chains/

The goal of this exercise is to create a program that solves word-chain puzzles.

A word chain is type of puzzle where the challenge is to build a chain of words, starting with one particular word and ending with another. Successive entries in the chain must all be real words, and each can differ from the previous word by just one letter.

For example, you can get from “cat” to “dog” using the following chain.

Cat -> cot -> cog -> dog

The objective of this exercise is to write a program that accepts start and end words and, using words from the dictionary, builds a word chain between them.

For bonus points, have your code check for and return the shortest word chain that solves each puzzle. For example, you can turn “lead” into “gold” in four steps (lead, load, goad, gold), and “ruby” into “code” in six steps (ruby, rubs, robs, rods, rode, code).

Instructions

All words in the chain must be real words. Each word in the chain can only differ from the previous word by just one letter. Use the included dictionary.txt to build your word chains. Chose whichever language you are most comfortable in (bonus points if you choose to write it in Python :) ). Unit tests are strongly encouraged.

breadth-first-search-word-chain-coding-solutions's People

Contributors

petermartens98 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.