Define findMaxEnergyTableEntry()

  This function finds the entry with maximum energy in
  the DP table.