Sunday, March 11, 2012

The Word Break Problem

Given an string and a dic­tio­nary of words, find out if the input string can be bro­ken into a space-separated sequence of one or more dic­tio­nary words.

3 comments:

  1. How to perform the same if diagonal traversal is not allowed

    ReplyDelete
  2. sorry but this wont give u the solution for moving in all the four directions!!!
    *You can move in any direction (up, down, left, right, diagonally).

    ReplyDelete