Question d’entretien chez Chargebee

Program in ide: Input - wwwaabbc Output - w3a2b2c1

Réponses aux questions d'entretien

Utilisateur anonyme

28 févr. 2022

Put the char as keys in a map and increase the count if occurring multiple time. Then print the map key and value.

1

Utilisateur anonyme

5 avr. 2022

def reverse(tuples): k='' s =[] for i in tuples: if i not in s: if tuples.count(i)>=1: s.append(i) s = ''.join(s) print(s) for i in s: m = tuples.count(i) k+=i+str(m) return k print(reverse('wwwaabbc'))