Visualizzazione dei risultati da 1 a 2 su 2

Discussione: Help me with a method

  1. #1
    Utente di HTML.it
    Registrato dal
    Dec 2008
    Messaggi
    9

    Help me with a method

    Can you help me to write this method?


    //A duplicate in an array is a value that appears more than once as element of the array.
    * Write a method static int numberOfDuplicates(int[] A) that returns the number of distinct duplicates in the array A.
    * Write also a method static int numberOfDistinctValues(int[] A) that returns the number of distinct values in the array A.//

    greets

    Frank

  2. #2
    Moderatore di Programmazione L'avatar di LeleFT
    Registrato dal
    Jun 2003
    Messaggi
    17,320

    Moderazione

    As described in the Rules: no homework.

    Ciao.
    "Perchè spendere anche solo 5 dollari per un S.O., quando posso averne uno gratis e spendere quei 5 dollari per 5 bottiglie di birra?" [Jon "maddog" Hall]
    Fatti non foste a viver come bruti, ma per seguir virtute e canoscenza

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.