Pku acm 2159 computing ent cipher sorting algorithm solution report (6) -- count sorting

Source: Internet
Author: User
Tags first string
The question is very complex. In fact, as long as the types and times of letters in two strings are the same, the question is yes, for example:
JWPUDJSTVP----------11111122
Victorious--11111122
Six letters appear once and two letters appear twice.
In this way, it is converted to a simple sort. A1 [] is used to represent the characters in the first string,
A1 [1], A1 [2] indicates the number of times a B appears, and so on. A2 [] indicates the second string.
The characters A2 [1] and A2 [2] indicate the number of times a B appears, and so on.
Sort the rows and put the results in B1 and B2. Then, compare B1 [I] and B2 [I] to see if they are equal.
Yes; otherwise, no.

With detailed commentsCodeFromHttp://download.csdn.net/user/china8848/.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.