OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Using Python heapq.heapify(Array)

  • Thread starter Thread starter swifty
  • Start date Start date
S

swifty

Guest
I want to use heapq.heapify(Arr) but everytime i want a slice of array to be used without creating new memory allocation for the new array. I want the rest of the array to be as is. example: heapq.heapify(arr[0:3]) and use rest of arr[3::] in some calculation and go on changing this slice width in a loop. Can I do it? I dont see arr being heapified in this case
<p>I want to use <code>heapq.heapify(Arr)</code> but everytime i want a slice of array to be used without creating new memory allocation for the new array. I want the rest of the array to be as is. example: <code>heapq.heapify(arr[0:3])</code> and use rest of <code>arr[3::]</code> in some calculation and go on changing this slice width in a loop. Can I do it? I dont see arr being heapified in this case</p>
 

Latest posts

I
Replies
0
Views
1
impact christian
I
Top