OJ says "a", ["a"] is Expected true? Why?

  • 0
    This post is deleted!

  • 0

    The question reads:

    Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words.

    The string "a" can be 'broken' into a single segment of one dictionary word. It is a bit of an edge case, but there is nothing in the question prohibiting the string from being broken into a single segment if the string is in the dictionary.

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.