Type: Posts; User: TBBucs

Search: Search took 0.20 seconds.

  1. Replies

    Implementing a 5-heap with an array

    So a binary heap can be implemented as follows:

    For any index i...
    parent of i = floor(i/2)
    left child of i = 2i
    right child of i = 2i+1

    But what about for non-binary heaps? Say, a 5-heap....
  2. Custom Java stack class (with generics) problem

    Ok, so here are my classes and interfaces:

    public interface I_LinkedStack<T> extends Iterable<T>
    public LinkedStack implements I_LinkedStack
    -- private static class Node<T>
    -- private class...
Results 1 to 2 of 2