Is this problem P or NP?
This is the element distinctness problem, and can be solved in polynomial time in many ways. For example, you can go over all pairs of elements and compare them, or if the elements are comparable, you can sort them and then check for duplicate elements (though in principle comparisons could be very time consuming, and in that case potentially the algorithms wouldn't be polynomial time; there's no such problem with the former algorithm).

Make sure you understand what "polynomial time" is. Also, you have a false dichotomy in your title: every problem in P is also in NP; if P=NP then every problem in P is also NP-complete; and if P≠NP then there are problems which are neither in P nor NP-hard.