added O(N) solution to find influencer