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.


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

Results 1 to 3 of 3

Thread: data structures question

  1. #1
    Join Date
    Oct 2012
    Thanked 0 Times in 0 Posts

    Default data structures question

    so i have a interview on data structures. i am sure they will ask question on 1d arrays. but what can they ask me?

    1.give a array find the max and min value.
    2.give a array find avg.
    3.sum of all value in array

    what else can they ask about 1d array?? or you can give me website which have question on arrays.

  2. #2
    Super Moderator curmudgeon's Avatar
    Join Date
    Aug 2012
    My Mood
    Thanked 140 Times in 135 Posts

    Default Re: data structures question

    what exception will be thrown if you try to access an array like so:

    int[] myArray = new int[3];
    myArray[3] = 7;

    When you create an int array, what are the initial values of all items?
    What about arrays of other primitives such as double, float, char,...?
    When you create a reference array (such as an array of String or Date, or any other reference non-primitive type), what initial values will it hold?

  3. #3
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    My Mood
    Thanked 263 Times in 232 Posts

    Default Re: data structures question

    ..sort, ascending and descending
    ..reverse an array
    ..shuffle an array
    ..see if an array contains a value

Similar Threads

  1. Please help about data structures.
    By bruce88 in forum What's Wrong With My Code?
    Replies: 4
    Last Post: September 16th, 2012, 04:11 PM
  2. [SOLVED] O(log n): a simple question for Logarithm in Data structures & Algo
    By chronoz13 in forum Algorithms & Recursion
    Replies: 1
    Last Post: September 7th, 2012, 08:20 AM
  3. [SOLVED] Data Structures: Symbolic Algebra with Trees
    By Staticity in forum What's Wrong With My Code?
    Replies: 2
    Last Post: August 20th, 2012, 01:42 AM
  4. Replies: 0
    Last Post: November 6th, 2011, 03:55 PM
  5. Data Structures(Binary Search Tree to AVL Tree)ASAP
    By jfAdik in forum Algorithms & Recursion
    Replies: 2
    Last Post: April 5th, 2010, 03:58 AM