Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: java.math help?

  1. #1
    Junior Member
    Join Date
    Jan 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default java.math help?

    [removed]

  2. #2
    Member andbin's Avatar
    Join Date
    Dec 2013
    Location
    Italy
    Posts
    443
    Thanks
    4
    Thanked 122 Times in 114 Posts

    Default Re: java.math help?

    Quote Originally Posted by Bump247 View Post
    that, given a non-empty zero-indexed array A of N integers, returns the first unique number in A. In other words, find the unique number with the lowest position in A. The function should return −1 if there are no unique numbers in A.
    The most basic and straightforward approach: a double nested for loop, the external loop to scan each number and the internal loop to check if that number repeats (it's sufficient one another) in successive elements.
    Andrea, www.andbin.netSCJP 5 (91%) – SCWCD 5 (94%)

    Useful links for Java beginnersMy new project Java Examples on Google Code

Similar Threads

  1. [SOLVED] Help with Math.tan and Math.atan
    By Dr.Code in forum Algorithms & Recursion
    Replies: 6
    Last Post: July 2nd, 2012, 05:54 AM
  2. Java and Math, yikes!
    By Tfence in forum Object Oriented Programming
    Replies: 4
    Last Post: November 22nd, 2011, 03:53 PM
  3. Confusion with Math.toDegrees() and Math.toRadians(). Please help.
    By marksquall in forum Java Theory & Questions
    Replies: 3
    Last Post: June 23rd, 2011, 01:28 AM
  4. Help need on math java program
    By zidangus in forum What's Wrong With My Code?
    Replies: 6
    Last Post: July 6th, 2010, 07:41 PM
  5. Math in Java?
    By [Kyle] in forum Java Theory & Questions
    Replies: 3
    Last Post: September 23rd, 2009, 12:21 PM