Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
rings
#11
buran Wrote:I may misunderstand your point though
deques are perfect if the program pushes and pops many items at the ends of the deque. It is perfect for stacks and fifos, but if the programs wants to access many times an element in the middle of the deque, it could be very inefficient because accessing the n-th element involves dereferencing n pointers. The getitem has a performance in O(n)
Reply


Messages In This Thread
rings - by Skaperen - Oct-15-2020, 03:26 PM
RE: rings - by Gribouillis - Oct-15-2020, 07:43 PM
RE: rings - by buran - Oct-15-2020, 08:18 PM
RE: rings - by ndc85430 - Oct-16-2020, 02:35 PM
RE: rings - by Skaperen - Oct-16-2020, 06:55 PM
RE: rings - by metulburr - Oct-17-2020, 11:23 AM
RE: rings - by Gribouillis - Oct-17-2020, 11:47 AM
RE: rings - by buran - Oct-17-2020, 02:58 PM
RE: rings - by Gribouillis - Oct-17-2020, 03:05 PM
RE: rings - by buran - Oct-17-2020, 03:12 PM
RE: rings - by Gribouillis - Oct-17-2020, 03:25 PM
RE: rings - by buran - Oct-17-2020, 03:45 PM
RE: rings - by Gribouillis - Oct-17-2020, 04:10 PM
RE: rings - by Skaperen - Oct-19-2020, 08:37 PM
RE: rings - by Skaperen - Oct-19-2020, 08:39 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020