72. Remove All Spaces
Foundation1000 ms256 MBSolved by 0%
Read one line and print it with every space removed. All other characters stay in their original order.
If the line is nothing but spaces, print an empty line.
Constraints - The line has between 1 and 100000 characters. - Printable ASCII only.
Input
A single line of text.
Output
Print the line with every space removed. Print an empty line if nothing remains.
Inputhello world
Outputhelloworld
Notehas one space to remove
Input a b c
Outputabc
Notehas leading, trailing and repeated spaces
Hint 1Approach
Hint 2Approach
Hint 3Pseudocode
Hint 4Full solution