Skip to main content
title
Link
Madara's Ghost
  • 175.6k
  • 52
  • 274
  • 314

Big O Number of actions of array_unique PHP

Source Link
Lizard
  • 45.3k
  • 39
  • 108
  • 170

Big O of array_unique PHP

Does anyone know the Big O of array_unique()?

I haven't gone through the source, but I would imagine it loops through each value and checks to to see if it is in the array which would be O(n^2) is this correct?

Thanks