See I understand that part but what I don't understand is how to call theQueue at an index...would I be using
return theQueue(arr, 0);
or something? That's what I don't understand. Thanks!
Type: Posts; User: lahegemon
See I understand that part but what I don't understand is how to call theQueue at an index...would I be using
return theQueue(arr, 0);
or something? That's what I don't understand. Thanks!
public class MyPriorityQueue{
private static class jobAd{
public float salary;
public float dist;
public float score;
public jobAd(){
}
public jobAd(float...
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{
...
basically, its supposed to print out the list (name, number)...however when i run it it just shows "run OABlist" but it doesn't do anything. And there are no compiler or runtime errors at all...so I...
Okay...SO I have the code written. It compiles and it runs...but it doesn't do what it's supposed to -__- I realize that's not helpful so heres a description of my assignment:
UML Diagram:
...
I'm not getting any errors with my code now. The addorReplace method is supposed to use linear complexity to add new phone entries (containing a string(name) and an int(number) ). However when I run...
This is what I have so far:
I need help with the addorReplace method, which adds entry alphabetically, and updates the number if the node exists. Please help! I can't get it add alphabetically!
...