As remains in mind <set <int="">?</set>



  • For example,

    set < set<int> , less<set<int>> > K; 
    

    How K keeps in mind? The set is kept in memory as a binary tree, and a set executive set int essay in which?



  • Usually. set<T> implemented through https://ru.wikipedia.org/wiki/%D0%94%D0%B2%D0%BE%D0%B8%D1%87%D0%BD%D0%BE%D0%B5_%D0%B4%D0%B5%D1%80%D0%B5%D0%B2%D0%BE_%D0%BF%D0%BE%D0%B8%D1%81%D0%BA%D0%B0 (sighs) https://en.wikipedia.org/wiki/Binary_search_tree ) Search, removal and retrieval operations have an average complexity O(log n), there is also a history of irration.

    In the case of multipliers set<set<T>> There are many second-level layers in wood cells. Second-level multipliers are sorted by a comparison operator <which is for multiples as https://ru.wikipedia.org/wiki/%D0%9B%D0%B5%D0%BA%D1%81%D0%B8%D0%BA%D0%BE%D0%B3%D1%80%D0%B0%D1%84%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%B8%D0%B9_%D0%BF%D0%BE%D1%80%D1%8F%D0%B4%D0%BE%D0%BA (sighs) https://en.wikipedia.org/wiki/Lexicographical_order )


Log in to reply
 


Suggested Topics

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