Renumber same values in lists

Hi, community!
Can someone help me with an issue with sets manage :sweat_smile:
Here I have a long list with some room names and what i want to do is to find the same names in each branch and assign a order number to them. so for example i have three bedrooms in one branch and i need them to become bedroom_1,bedroom_2,bedroom_3. this should be applied only for those items that appear in each list more than once. (Concatenate with order number for these values)

Tried some logics with sets components but ended up broking tree structure…
Below is the logic i tried to apply, but without success for my data tree:

Any ideas how to number in order same values in lists saving tree structure?

Here is example gh:
Renumber same values in (15.7 KB)

That’s elementary with code (LINQ): (9.1 KB)

BTW: Not all Types are suitable for OrderBy/GroupBy. So as it is is not the jack of all trades. Notify if you want a general equality comparer (a chimera) thingy.


Renumber same values in (21.2 KB)


Thank you @PeterFotiadis ! This works well for me, I will only need to analyze the text or the numbers Type of data
:pray: :blush:

Thank you, @HS_Kim ! I was thinking of that type of solution but did not manage that data tree :sweat_smile:
Great solution, it does exactly what i wanted :star_struck: :pray: