What do you want to save?
Add Code snippet
New code examples
-
Other 2021-11-13 03:14:24
Difference between Priority Queue and Heap
This is frequently used in Competitive Programming. We first multiply all elements with (-1). Then we create a max heap (max heap is the default for priority queue). When we access the data and want to print it we simply multiply those elements with (-1)... Add solution -
C++ 2021-11-13 01:16:11
heap sort heapify and max heap in binary tree
Implementation of heap sort in C: #include <stdio.h> int main() { int heap[10], array_size, i, j, c, root, temporary; printf("\n Enter size of array to be sorted :"); scanf("%d", &array_size); printf("\n Ent... Add solution -
Java 2021-10-29 19:36:09
use Java NetBeans to write code to implement the list [5, 3, 17, 10, 84, 19, 6, 22, 9] in a Max Heap data structure. For each parent node, display the left and right child of the node.
The Max Heap is PARENT : 52 LEFT CHILD : 21 RIGHT CHILD :23 PARENT : 21 LEFT CHILD : 15 RIGHT CHILD :13 PARENT : 23 LEFT CHILD : 7 RIGHT CHILD :16 PARENT : 15 LEFT CHILD : 5 RIGHT CHILD :9 The max val is 52 Add solution -
C++ 2021-10-28 02:21:11
heap sort internal implementation using c++
Implementation of heap sort in C: #include <stdio.h> int main() { int heap[10], array_size, i, j, c, root, temporary; printf("\n Enter size of array to be sorted :"); scanf("%d", &array_size); printf("\n Ent... Add solution -
Java 2021-09-14 20:43:03
java xmx vs xms
-Xms: It is used for setting the initial and minimum heap size. It is recommended to set the minimum heap size equivalent to the maximum heap size in order to minimize the garbage collection. -Xmx: It is used for setting the maximum heap size. The perfor... Add solution
Best helpers
Alexingohr
+5
Cali
+5
Veirtimid
+5
Anon8889
+5
Sardathrion
+5
Nuria
+5
Tony Ong
+5
Mike Adams
+5
Shachna
+5
PoundingRain
+5
Zhengyue
+5
Shahar Tene
+5
Kang
+5
Altexpape
+5
Aung68618
+5