This post originated from an RSS feed registered with Java Buzz
by Javin Paul.
Original Post: How to check or detect duplicate elements in Array in Java
Feed Title: Javarevisited Blog
Feed URL: http://javarevisited.blogspot.com/feeds/posts/default?alt=rss
Feed Description: Blog on Java, Unix, Linux, FIX Protocol technology. I share my experience as tutorial, article, interview questions, programming, design etc.
Detecting duplicate elements in Java array is another programming interview question I like. There could be lot of way you can check if your array contains duplicate elements or not and sometime you discover a unique way of checking duplicates by asking this question on Java interview. Beauty of this question is that it has endless number of follow-up question so if interviewee get through this question you can ask to him about time complexity and space or to improve his algorithm to make it fast .you can even ask to find those duplicate elements in Array which even can go from one duplicate to many repeating elements in Array. As I said you can really test programming skill around array of a Java programmer.