A highly efficient tree based algorithm for studying site or bond percolation on any lattice system is described. Our approach is to identify the connectivity of the lattice sites in a single phase and to reduce the redundant computational load in each lattice update. Efficiency increases due to the
creation of a multi-branched tree of the pointers of the cluster numbers at the time of investigation of cluster organization. At the later updates, the computational efficiency increases further as the algorithm would have to work only on the randomly chosen lattice sites or bonds instead of traversing the entire lattice.