Computer Science, asked by aaravtiwari24, 10 months ago

Assume we are writing a tool which needs a word completion feature for English. We have a dictionary of all English words (comma-separated text file). The tool should show a maximum of three possible words if found at any time. - Provide pseudo code or full code. Q2. Describe and explain the time complexity of your search algorithm (Big-O) for the above problem. - Can we use this for real-time word-completion suggestions? i.e. suggest completion options as the user is typing.

Answers

Answered by adityachoudhary2956
79

\huge\underline\bold \red {AnswEr : }

&lt;p style = " color:cyan ; front-family ; cursive ;background :black; front size25 px; " &gt; Given an input string and a dictionary of words, find out if the input string can be segmented into a space-separated sequence of dictionary words. See following examples for more details.</p><p></p><p>_____________________________________</p><p></p><p>Consider the following dictionary  </p><p></p><p>{ i, like, sam, sung, samsung, mobile, ice,  </p><p></p><p> cream, icecream, man, go, mango}</p><p></p><p>Input:  ilike</p><p></p><p>Output: Yes  </p><p></p><p>The string can be segmented as "i like".</p><p></p><p>Input:  ilikesamsung</p><p></p><p>Output: Yes</p><p></p><p>The string can be segmented as "i like samsung"  </p><p></p><p>or "i like sam sung".</p><p></p><p>

_______________________________

{\huge{\mathbb\pink{ThAnks,}}}

❤❤ I hope it's helpful ❤❤

❤❤good day❤❤

Answered by XxlovelyaditixX
29

ᴀɴsᴡᴇʀ

Given an input string and a dictionary of words, find out if the input string can be segmented into a space-separated sequence of dictionary words. See following examples for more ᴅᴇᴛᴀᴀ

ɪ ʜᴏᴘᴇ ɪᴛ ʜᴇʟᴘ ᴜ

«тнαηкѕ»

Similar questions