GithubHelp home page GithubHelp logo

seaplanetest's Introduction

seaplanetest

My submission for the technical assessment for Seaplane.

Technical Assessment Description

Design and implement a function in Python that takes two words and a dictionary of words as input. Your function should return the shortest possible path between the two words by changing one letter at a time. Each change is one path step.

You can assume that:

  • Both the start and end words are lowercase strings of varying lengths.
  • The start and end words can be different lengths.
  • Only one letter can be changed, added, or deleted at a time.
  • Each intermediate word must exist in the dictionary of words

This repo

  1. func.py file: The main function shortestWordPath() exists in this file. The function takes in 3 parameters (startWord: string, endWord: string, wordDict: Dictionary)
    • Outputs the shortest path as: "do - dog - dig", (as a string separated by dashes)
    • Outputs None if there is no path to be found.
    • NOTE: I assumed wordDict to be a dictionary where the key is the word, and the value = True (it exists), so all the keys in this dictionary will have value of True
  2. testsuite.py file: I included some simple tests for my function, just to show edge cases and also expected output for all cases.
    • If you run the testsuite.py as is, it runs all the small tests I wrote. Run it like: python3 testsuite.py
  3. IMPLEMENTATION.md file: I included a small explanation of my implementation of the function (thought process, assumptions made)

seaplanetest's People

Contributors

eshia 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.