Re:On a Great Interview Question
by ttoinou on Wednesday April 12, 2023 @07:26PM
(#35548503)
I would do that straight away. I don't see the point of implementing the more complex and longer to code "double dictionary checking for all partitions of the string"
[ Parent
| on HN ]
Consider the string "thereis", and the dictionary {"there", "is"}. The greedy algorithm fails.
My bad. The dictionary should be {"the", "there", "is"}.
Re:On a Great Interview Question
by whiddershins on Wednesday April 12, 2023 @11:58PM
(#35550756)
I am now getting that I didn’t understand what you meant by greedy.