[Full Score] [Huawei OD machine test real questions 2023 JAVA&JS] string reordering

HUAWEI OD machine test real questions, the 2023 year machine test question bank is fully covered, click here for the guide of brushing the questions

string reordering

Knowledge point sorting array

 Time limit: 1s Space limit: 256MB Limited language: unlimited

Title description:

Given a string s, s contains several words separated by spaces, please process s as follows and output:

1. Word internal adjustment: re-sort the letters of each word in lexicographical order;

2. Adjust the order of words:

    1) Count each word occurrence

Guess you like

Origin blog.csdn.net/qq_34465338/article/details/128609050