Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 39796

CHODE - Editorial

$
0
0

PROBLEM LINK:

Practice
Contest

Author:Vitalij Kozhukhivskij
Tester:Mahbub
Editorialist:Jingbo Shang

DIFFICULTY:

Cakewalk

PREREQUISITES:

Programming Language

PROBLEM:

Given a simple encryption method using the frequency, decrypt n strings.

EXPLANATION:

To solve this problem, the key is to get the mapping. That is:

  1. Get the frequency of each character in the input string (bins are used here);
  2. Sort them in order;
  3. Find the mapping;
  4. Decrypt it.

The time complexity is O(L), where L is the total length of the input strings.

AUTHOR'S AND TESTER'S SOLUTIONS:

Solutions to be uploaded soon

Author's solution can be found here.
Tester's solution can be found here.


Viewing all articles
Browse latest Browse all 39796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>