User Profile

Collapse

Profile Sidebar

Collapse
EquinoX
EquinoX
Last Activity: Feb 12 '08, 11:05 PM
Joined: Feb 1 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • EquinoX
    started a topic how do you find the mode of an array
    in Java

    how do you find the mode of an array

    Here's my nonworking code:

    Code:
    int count = 0;
    		int prevCount = 0;
    		int totalCount = 0;
    		
    		for (int i = 0; i <array.length; i++){
    			for (int j = i + 1; j < array.length; j++){
    				if (array[i] == array[j]){
    					count++;
    					i++;
    				}
    			}
    			
    			if (count >= prevCount){
    				totalCount++;
    			}
    			
    			prevCount
    ...
    See more | Go to post

  • EquinoX
    started a topic help me with this union method
    in Java

    help me with this union method

    I am writing a method with header like this:

    public Set<E> union (Set<E> other){

    }

    say I have a test method:
    Code:
    @Test
    	public void testUnion() {
    		ArraySet<Integer> a = new ArraySet<Integer>(10,20);
    		a.add(1);
    		a.add(3);
    		a.add(5);
    		a.add(7);
    		a.add(9);
    		
    		ArraySet<Integer> b = new ArraySet<Integer>(10,20);
    ...
    See more | Go to post

  • EquinoX
    started a topic What is ADT? (Abstract Data Type)
    in Java

    What is ADT? (Abstract Data Type)

    I am currently studying about this ADT but I don't get the concept at all. Can someone please explain to me what this actually is?? Also what is collection, bag, and List ADT?? in simple terms? Thanks
    See more | Go to post
No activity results to display
Show More
Working...