Huawei OD machine test - delete the least frequently occurring character in a string (C++ & Java & JS & Python)

Table of contents

describe

Enter a description:

Output description:

Example 1

Java:

python:

C++:


describe

Realize the deletion of the character with the least number of occurrences in the string. If there are more than one character with the least number of occurrences, delete all the characters with the least number of occurrences. Output the string after deleting these words, and keep other characters in the string in the original order.

data range:

Guess you like

Origin blog.csdn.net/m0_68036862/article/details/132693346