0

I'm new to python-3x and I'm having a hard time understanding what it means for N to be smaller compared to the overall size of the collection: "If you are looking for the N smallest or largest items and N is small compared to the overall size of the collection, these functions provide superior performance. Underneath the covers, they work by first converting the data into a list where items are ordered as a heap." https://www.oreilly.com/library/view/python-cookbook-3rd/9781449357337/ch01.html

  • It sounds like you are quoting something you read in some documentation. Can you include a link to it so that we can see the context? It sounds like you are asking about a Big-O statement, but can't be sure without context. – Daniel Skarbek May 17 '19 at 01:21
  • "If you only want a small portion of the items out of all the items you have." – Boris Verkhovskiy May 17 '19 at 01:27

0 Answers0