Precisely what I was thinking. Couldn't I just replace my comparisons for some of my theHeap[index] comparisons with theHeap[index].score comparisons? But then I would ave to write a separate...
Type: Posts; User: lahegemon
Precisely what I was thinking. Couldn't I just replace my comparisons for some of my theHeap[index] comparisons with theHeap[index].score comparisons? But then I would ave to write a separate...
capacity is set in a separate constructor also, look at my reply below. that's my current program but...well, my questions are in the same post. Thanks
public class MyMaxHeap{
private class jobAd{
public float salary;
public float dist;
public float score;
public jobAd(float s, float d){
s = salary;
d =...
public class MyMaxHeap{
private class jobAd{
public float salary;
public float dist;
public float score;
public jobAd(float s, float d){
s = salary;
d =...
Okay, so I have an assign,ent to write a priority queue that implements a max heap. I've only just started the program and this is what I have for my MyMaxHeap class:
public class MyMaxHeap{
...