Answer to Question #60938 in Java | JSP | JSF for sangeetha
First line contains total number of test cases, denoted by N
Next N lines, each contains a text in which words are at odd position and numbers are at even position and are delimited by space
Words and numbers sorted in ascending order and printed in a manner that a word is followed by a number.
1. Text starts with a word
2. Count of words and numbers are the same.
3. Duplicate elements are not allowed
4. Words should be printed in lower case.
5. No special characters allowed in text.
Sample Input and Output
SNo. Input Output
Sagar 35 sanjay 12 ganesH 53 ramesh 19
Ganesh 59 suresh 19 rakesh 26 laliT 96
ganesh 12 ramesh 19 sagar 35 sanjay 53
ganesh 19 lalit 26 rakesh 59 suresh 96
Need a fast expert's response?Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!