> I meant by composing them in another class, which could then have
> whatever interface makes sense for this data structure.
Ah, I see. I had misunderstood you and thought you were advising the OP to
combine list and Counter into their own new data structure, which seemed a
bit overkill.
That ma
On 1/15/2020 7:43 PM, Kyle Stanley wrote:
> I suggest that when you need this functionality you create your own
data
> structure combining a list and a collections.Counter and keep track of
> this yourself.
I concur with the usage of collections.Counter here. Storing the count
for every single
> I suggest that when you need this functionality you create your own data
> structure combining a list and a collections.Counter and keep track of
> this yourself.
I concur with the usage of collections.Counter here. Storing the count for
every single item in a list could end up being rather redu
On 1/14/2020 11:03 PM, Hunter Jones wrote:
Hey everyone,
I recently used list.count() in a coding interview and the question
arose about how scale-able this solution was for sufficiently large
input. Currently, list.count iterates through the list, incrementing
the count as it goes and return
On Tue, Jan 14, 2020 at 10:03:24PM -0600, Hunter Jones wrote:
> Hey everyone,
>
> I recently used list.count() in a coding interview and the question arose
> about how scale-able this solution was for sufficiently large input.
> Currently, list.count iterates through the list, incrementing the cou
On Wed, 15 Jan 2020 at 13:37, Hunter Jones wrote:
>
> Hey everyone,
>
> I recently used list.count() in a coding interview and the question arose
> about how scale-able this solution was for sufficiently large input.
> Currently, list.count iterates through the list, incrementing the count as it