can't see the problem, ask me to login.
also, you should try to explain to us (the problem and your solution), as it may be the case that you misunderstood the problem.
you need to calculate the order of your solution, according with the input limits and the worst case escenario.
in your first version you've got O(n*Et), in the second one O(Et), ¿how big is Et? ¿how big is n? ¿how does Et compare to n?
as a rule of thumb, the number for the worst case should fall around one million.