Microsoft Interview Question for Software Engineer / Developers
- 0of 0 votes
Write a word processor that can do left and right justification for a sample input of string type.- annu025 March 07, 2018 in United States
Here is an example:
This is a sample.This is a sample.This is a sample.
This is a sample.This is a sample.This is a sample.This is a sample.
* The left margin is 5 units.
* The right margin is 75 units.
* The input string is a single-spaced collection of words and punctuation.
* If the length of the word exceeds the right margin, then we must not break the word. Instead, we must print it on the next line and justify the existing line by adding more spaces to the middle of the line.
| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer String Manipulation
Interview Type: In-Person
Open Chat in New Window