DEV Community

loading...

Discussion on: Java Data Structures

hamidur01 profile image
Hamidur Rahman

Then I think you meant constant time O(1) for add, contains, and remove. Iteration on any structure is always O(n).

Thread Thread
vrnsky profile image
Yegor Voronyansky Author • Edited

Yeah! for this operation I meant