×

# Doubt in "k-good" editorial

 0 The problem k-good strings from snackdown qualifier. In the editorial's optimization section it is written that we need to consider only those m's that is value of some count. Anyone please explain this part of the editorial. asked 02 Jun '16, 10:13 1★arpit728 683●17●65 accept rate: 10% 2★skbly7 1.9k●9●17●24

 0 We need to consider only those m's(m is the minimum frequency count of the alphabets) which are equal to some wc (alphabet frequency). Suppose we have alphabet frequencies as 10 20 30 40 50 and K=5. So for m=[0,10] we get the the sequence of 10 20 30 40 50. Similarly for m=[11,20] we get the sequence of 20 30 40 50. and so on..... So we only calculate for those values of m which are equal to some wc. answered 02 Jun '16, 12:55 96●2 accept rate: 42%
 toggle preview community wiki:
Preview

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported
• mathemetical formulas in Latex between \$ symbol

Question tags:

×1,657
×1,000
×643

question asked: 02 Jun '16, 10:13

question was seen: 1,633 times

last updated: 04 Jun '16, 15:47