id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

hasRepeat


Given an array of integers, return true if the array contains at least two values that are the same, and false otherwise. Solve this without modifying the given array or creating a new array.


hasRepeat([]) → false
hasRepeat([3, 4, 3]) → true
hasRepeat([1]) → false

...Save, Compile, Run (ctrl-enter)

boolean hasRepeat(int[] nums) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 215

Copyright Nick Parlante 2017 - privacy