Domanda di colloquio di Amazon

Question: Given a single string, split it into all of its valid words given a isValid(str) function. "treesaregood" -> [trees, are, good] "catsmell" -> [cat, smell]

Risposta di colloquio

Anonimo

24 feb 2024

I used a dp approach with a boolean array to figure out if there is a valid set of a string that perfect fit up to i dp[i] = T/F. Could not figure out how to reconstruct but inteview gave a pass