Abbreviations, automatic: Difference between revisions

Content deleted Content added
Line 2,308:
 
We provide two solutions, one consisting to build the abbreviations for each language and stopping when all of them are different, the second sorting the list of day names for each language and adjusting the abbreviation length to make sure that two consecutive day names are different. The second method should be more efficient, but it doesn’t really matters here.
====Using a set====
<lang Nim>
import sets
Line 2,342:
echo line
</lang>
====Using a sorted list====
<lang Nim>
import algorithm