Question
Write a program that reads a line of text from the standard input and prints out the input string but with blanks inserted so that
Write a program that reads a line of text from the standard input and prints out the input string but with blanks inserted so that the output is a sequence of Englishwords. Take English words to mean words in the file words.txt. The input is a string of lower-case letters (no punctuation or blanks).The output is the same string but with blanks inserted so that each string delimited by the blanks is a word in words.txt. If it is not possible to produce such a string, your program should print out null.Name your program RestoreBlanks. For example, if the input is:theedgeofknowledgethen a correct output is the edge of knowledge there is more than one correct output, then your program should print only one. For example, if the input is: formany then your program could print out formany or form any (not both). The output does not need to make sense. For example, if the input is butthough, then one correct output is but though.Another correct output is butt ho ugh (these are in words.txt).
I need a binary search and in Java plz
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started