вс, 14 мар. 2021 г. в 00:41, Robert Engels :
>
> That wasn’t specified in the assignment :)
=) As always after first stuff i need the second =)
>
> On Mar 13, 2021, at 2:59 PM, Levieux Michel wrote:
>
>
> Your need is not only to sort your data elements then..?
> Using the previously advised s
I think that remove after sort is good for me, thanks
сб, 13 мар. 2021 г. в 23:59, Levieux Michel :
>
> Your need is not only to sort your data elements then..?
> Using the previously advised solution you can just range the slice *after*
> you sort it, so you can just check for the next element,
That wasn’t specified in the assignment :)
> On Mar 13, 2021, at 2:59 PM, Levieux Michel wrote:
>
>
> Your need is not only to sort your data elements then..?
> Using the previously advised solution you can just range the slice *after*
> you sort it, so you can just check for the next elemen
Your need is not only to sort your data elements then..?
Using the previously advised solution you can just range the slice *after*
you sort it, so you can just check for the next element, which I'd say is
not *too bad*, what are your performance constraints?
Le sam. 13 mars 2021 à 21:33, Vasiliy
Looks fine =) But how to remove duplicates?
I'm found this stuff
https://github.com/campoy/unique/blob/master/unique.go but as i
understand it needs to adapt to my case =)
сб, 13 мар. 2021 г. в 16:47, 'Carla Pfaff' via golang-nuts
:
>
> On Saturday, 13 March 2021 at 14:44:05 UTC+1 mlevi...@gmail.c
On Saturday, 13 March 2021 at 14:44:05 UTC+1 mlevi...@gmail.com wrote:
> the sort package from the stdlib, it contains an interface that you can
> easily implement for such problematics :)
>
Like this: https://play.golang.org/p/eoLJ2aVAWkD
--
You received this message because you are subscri
Hi,
You should take a look at the sort package from the stdlib, it contains an
interface that you can easily implement for such problematics :)
Hope this helps!
Le sam. 13 mars 2021 à 14:37, Vasiliy Tolstov a
écrit :
> Hi!
> I'm stuck at sorting stuff like
>
> []string{"xxxkey","xxxval","zzzke
Hi!
I'm stuck at sorting stuff like
[]string{"xxxkey","xxxval","zzzkey","zzzval","aaakey","aaaval","zzzkey","val"}
i need to get after sorting something like
[]string{"aaakey","aaaval", "xxxkey","xxxval","zzzkey","val"}
So i'm sort by "key" and if key is duplicated - last wins.
Mostly i wa