emory-courses / dsa-java

Data Structures and Algorithms in Java
https://emory.gitbook.io/dsa-java/
42 stars 55 forks source link

[QZ#5] Entity Overlap #140

Closed TFloyd1989 closed 4 years ago

TFloyd1989 commented 4 years ago

Is it okay if we define the same Entity twice(same exact indexes and ID)? My method does this sometimes in order to catch a particular case. When it outputs, that entity is only in the list once as well.

marvinquiet commented 4 years ago

I am not sure why would you need the same Entity twice? Could you please explain more about that?

TFloyd1989 commented 4 years ago

It doesn't happen very often, but in order to get some edge cases, an entity may be defined twice in the process

marvinquiet commented 4 years ago

Got it! It should be fine as long as you can get the correct set of entities in the end.

TFloyd1989 commented 4 years ago

Oh okay, thank you