DEV Community

Discussion on: Check two array are equal or not in O(n):🙄

Collapse
 
fjones profile image
FJones
  1. It might be worth noting that you mean that the arrays contain the same elements but in arbitrary order. Equality of arrays is usually including the order.
  2. While this is indeed technically linear, it is also simply leveraging the operator == overload of map: cplusplus.com/reference/map/map/op...