Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BreakSentenceByDict ¶
func BreakSentenceByDict(s string, wordDict WordDictionary) []string
BreakSentenceByDict looks for all possible combinations of word breaks based on dictionary sent and returns all possible sentences with a space after the words (present in the dictionary)
Types ¶
type Sentence ¶
type Sentence struct {
Value string
}
Sentence keeps track of all words separated and also tells whether it's complete (i.e. all words in dict separated and no letters left)
type SentenceMap ¶
SentenceMap holds the maximum sum belonging to a particular node of a tree and below (across all possible paths). The node value along with the depth is kept as the hash key of the map
Click to show internal directories.
Click to hide internal directories.