Just normal question,give me the answer as a friend

In interview if I am doing a coding question in O(2*N) but there is already a solution of that question in O(N) so will my solution be less effective in the interviewer’s mind??

actually it depends on interviewer’s question

if is asked to provide the optimal solution then definitely it will less effective in the interviewer’s mind

but if it is asked to just provide the solution then it is okay
after this O(2*N) solution the interviewer ask you to solve this question in O(N) and then you have to think and provide that solution

I am not saying 2^N(2 raise to the power N). it was 2*N(2 multiplied by N) . By this I meant that it will still be O(N) but I am doing a question in two pass then will he be impressed??

yes my ans is still same for O(2*N)

suppose interviewer asked you a simple question which you should have to solve in O(N) but you solved it in O(2*N) then interview consider you as low level
and ask you a another simple question if you answered it correctly then he ask you a medium level question if answered that also then he keep increasing his level

this is how questions are asked
if your level matched with company’s requirement then you are selected