Search:

Type: Posts; User: arsparfven

Search: Search took 0.09 seconds.

  1. [SOLVED] Re: Help with Min Heap Implementation (with an array)

    I believe my problem now is just that the duplicates aren't ordered in any way as a subset on their own (like, if they are duplicates because their number count is the same in a text file, they...
  2. [SOLVED] Re: Help with Min Heap Implementation (with an array)

    I found something that was wrong, in my insert method. While bubbling up, in the while loop, I was modifying the parent in the wrong place. The lines inside the while loop should go


    swap(temp,...
  3. Replies
    20
    Views
    1,932

    Re: Array Issues

    I know for just finding the middle index, you could use the line of code Norm put up for you..."middle element = (array.length+1)/2"
    If you have a count, you could use "count/2" as count would...
  4. [SOLVED] Re: Help with Min Heap Implementation (with an array)

    Sorry if I'm posting too much, I'm just trying to get as much information out as I can.
    Using this as a main to test the heap:



    MinHeap<Integer> heap = new MinHeap<Integer>();
    for(int i =...
  5. [SOLVED] Re: Help with Min Heap Implementation (with an array)

    For the whole program, the zip is attached. It has everything you need, and maybe some extra files because of how eclipse works. All the input is in testFile, a text file in this folder. Currently it...
  6. [SOLVED] Re: Help with Min Heap Implementation (with an array)

    Since I don't have a simple program for output yet, this is an example of output. This is me removing a minimum element (the root), and then removing the next minimal element (after the program...
  7. [SOLVED] Re: Help with Min Heap Implementation (with an array)

    Actually, if it's more helpful, I could attach all the classes I am using (in a zip or rar file, of course). They have a pretty nice output set up that couldn't be achieved really without a lot of...
  8. [SOLVED] Re: Help with Min Heap Implementation (with an array)

    I have one, but the problem is that the complete program is decently complex and uses an AVL tree, corpus, and a special class for the comparisons for the data I'm inputting.

    I can make a shorter,...
  9. Replies
    20
    Views
    1,932

    Re: Array Issues

    I don't know how your methods are set up, but if you have a global array of integers ( int[] guesses or something like that ), each the user inputs a guess, which has to be looped somehow I assume,...
  10. [SOLVED] [SOLVED] Help with Min Heap Implementation (with an array)

    I'm trying to implement a Min Heap in Java, but I'm having issues with inserting and removing elements (inserting at the end, removing the root as min). It seems to work for the most part (I use a...
Results 1 to 10 of 10