Message Coder

A message encoding of a given non-empty string s is a dictionary cs
which contains, for each unique symbol in s, an ordered list of the
positions where that symbol occurs within s.

Implement the function @coder(s)@ such that, given the message s, it
returns a dictionary where the keys are the unique symbols in s, and the
values are ordered lists containing the positions at which each symbol
appears in s.

Sample session

Problem information

Author: Professors Informàtica EEBE

Generation: 2026-01-25T13:39:47.610Z

© Jutge.org, 2006–2026.
https://jutge.org
