01-08-2024 05:48 AM
Check this
01-08-2024 06:47 AM
Actually I need the non repeated elements to be deleted and the repeated elements to be printed once.
01-08-2024 07:15 AM
Hi Hemanth,
@stark8 wrote:
Actually I need the non repeated elements to be deleted and the repeated elements to be printed once.
I'm sorry, I implemented it in the opposite direction…
Adapt as needed - or use the Map approach also shown in this thread!
01-08-2024 07:43 AM
Here are a couple different ways.
01-08-2024 09:31 AM
Can u help me out i can't figure it out....
01-08-2024 09:37 AM
Hi Hemanth,
@stark8 wrote:
Can u help me out i can't figure it out....
Who is "u" and why can't you use one of the suggested solutions?
01-08-2024 09:59 AM
Have you tried my solution?
Is your expected output matches with the below results
01-08-2024 11:32 AM
I would probably use a map as follows (Note that the input does not need to be sorted):