Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
0 votes
1 answer
150 views

i was looking at this heap implementation, and i was wondering if it is necessary to implement heap for printf even if i'm calling setvbuf(stdout, NULL, _IONBF, 0) before calling printf. i looked at ...
W4ZM's user avatar
  • 75
1 vote
2 answers
84 views

According this awesome article there is an interesting case with two given examples: A: B: And there is an explanation for A: Unfortunately you have not taken into account that such Strings will ...
0 votes
1 answer
49 views

In a microcontroller without any OS, how does the microcontroller keep track of where a malloc will point to in the heap? char *x; char *y; char *z; x=(char*)malloc(10); y=(char*)malloc(10); free(x); ...
2 votes
4 answers
195 views

I'm working on a problem where I need to maintain the median of a data stream, but unlike typical implementations that only support insertions, I also need to support deletions of arbitrary values. ...
1 vote
1 answer
225 views

I am trying to write an efficient multistep solver in C++ using the Eigen library. To do so, I need a few variables that keep track of the history. One of them is of type Eigen::VectorX<Eigen::...
4 votes
1 answer
108 views

I'm trying to port a program I wrote in windows with syscalls to linux. The program reads the memory of another running process and displays certain values as they change. To get started and figure ...
1 vote
1 answer
102 views

I am currently running a C++ program in which I have used the heap to simulate the stack and employed assembly language to place relevant information (such as memory addresses) into registers, thereby ...
0 votes
1 answer
81 views

I do have this code. @RequestMapping("/test") fun getData(): ResponseEntity<ByteArray> { val items = repository.getItems() val outputStream = ByteArrayOutputStream() ...
1 vote
3 answers
141 views

In heapsort, the heap is max-heap where each time we extract the maximum element from index 0 and place it at the right side of the array. I'm now wondering why we don't build the max-heap in reverse, ...
Fff's user avatar
  • 80
2 votes
1 answer
198 views

The undocumented (I can't find a MSDN reference) FrontEndHeapDebugOptions Registry key has two flags: Bit 2 (0x04) for disabling the Segment Heap, thus forcing NT Heap Bit 3 (0x08) for enabling the ...
1 vote
1 answer
129 views

I know that a min pairing heap can decrease a key faster than O(logn). However, is there any way to make the increase key operate also faster than decrease key to the top, remove, than insert new ...
0 votes
1 answer
60 views

import heapq minHeap = [4, 7, 2, 8, 1, 3] heapq.heapify(minHeap) # O(n log n) operation print(minHeap) # [1, 4, 2, 8, 7, 3] heapq.heappush(minHeap, 1) # O(log n) operation? print(minHeap) # ...
etang's user avatar
  • 578
1 vote
0 answers
49 views

I am using priority queue to do the hierarchical clustering(can not import heapq), and want to use the complete-link method, but I don't know what is the problem of my code, the reason is far from ...
5 votes
0 answers
111 views

The C++ standard explains how std::pop_heap is supposed to work: Effects: Swaps the value in the location first with the value in the location last - 1 and makes [first, last - 1) into a heap with ...
Tom's user avatar
  • 51
0 votes
1 answer
125 views

I am trying to understand merging two sorted lists into one sorted output. Got the below code from internet. trav's value will have to be the address of mergedHead but here, trav is holding the value ...
Preethi's user avatar
  • 55

15 30 50 per page
1
2 3 4 5
...
126

AltStyle によって変換されたページ (->オリジナル) /