Curious to know how distance fn. work on set!!

Revision en1, by TARS, 2020-09-27 07:41:19

I'm solving a problem called number of smaller elements on the right side of an array. I saw stl solution based on the set they've used "distance(s.begin(), it)" I know how distance fn works on linear data structure but I don't know how it goes with a hierarchal structure like a set, etc.. Do you have an idea about how it works on trees?

Tags #set, #trees, #distance

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English TARS 2020-09-27 07:41:19 387 Initial revision (published)