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

 

amjadm@miamioh.edu > getSingleNum
prev  |  next  |  chance

Given a non-empty array of ints, return an int value representing the first element inside the array which is not duplicate. You can always assume there is at least one element inside the array which is not duplicate.


getSingleNum([1]) → 1
getSingleNum([3, 2, 2]) → 3
getSingleNum([1, 20, 20, 1, 4, 5, 20]) → 4

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

public int getSingleNum(int[] arr) { }

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: 240

Copyright Nick Parlante 2017 - privacy