About 26,000 results
Open links in new tab
  1. Find duplicate elements in an array - GeeksforGeeks

    Dec 19, 2024 · Given a sorted and rotated array arr[] and a key, the task is to find whether key exists in the rotated array (with duplicates). Examples: Input: arr[] = [3, 3, 3, 1, 2, 3], key = 3 …

  2. Java Array, Finding Duplicates - Stack Overflow

    Oct 17, 2010 · possible duplicate of Java: Detect duplicates in ArrayList? -- It's not entirely the same but... note the use of a Set/intermediate "store" vs. a nested loop. In your case, …

  3. How To Find Duplicates In Array In Java? - 5 Methods - Java

    Jan 21, 2019 · In this post, we will learn to find duplicate elements in array in java using Brute Force method, using Sorting method, using HashSet, using HashMap and using Java 8 …

  4. Find Duplicate Elements and Their Frequency in an Array in Java

    Jan 5, 2023 · Learn how to find duplicate elements and their frequency in an array using Java. This guide provides step-by-step instructions and code examples.

  5. Program to Print the Duplicate Elements of an Array - Java

    Jan 20, 2025 · The HashSet method is one of the most efficient ways to find duplicates in an array. A HashSet allows unique elements. So, whilst we attempt to add a detail that already …

  6. Java Program to Find Duplicate Elements in an Array - Java Guides

    This Java program provides multiple methods to find duplicate elements in an array, demonstrating different techniques such as nested loops and using a HashSet. Each approach …

  7. How to Find Duplicate Elements in a Java Array

    May 4, 2023 · In this tutorial, we will explore different methods to find duplicate elements in a Java array, including using nested loops, sets, streams, and hash tables. We will also discuss the …

  8. Java 8 – How to find duplicate and its count in an Arrays

    Apr 22, 2022 · In this article, we will discuss how to find and count duplicates in an Arrays in different ways. Let us discuss each one with example and description. 1. Using Stream.distinct …

  9. How to find duplicates in a java array? - Stack Overflow

    Sep 17, 2014 · int[] array = createRandomArray(2000000, 1000000); System.out.println(countNumDups1(array)); int[] array = new int[numElements]; Random …

  10. 3 Ways to Find Duplicate Elements in an Array - Java - Blogger

    Apr 13, 2023 · There are multiple ways to find duplicate elements in an array in Java and we will see three of them in this program. The solution and logic shown in this article are generic and …

Refresh