Why is the verification of the presence of a multiplicity element on the list taking place at different times?



  • Why is the verification of the presence of a multiplicity element on the list taking place at different times?



  • Because on the list (massium) to verify that there is an element, we need to look at all the elements, that is, spend O(n) time (line time)

    a multiples to understand the element index where the element is stored can calculate the xash from the element

    index = hash(value)
    

    In this case, the search for the element will be the constant time O(1)


Log in to reply
 

Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2