Search:

Type: Posts; User: 3sbwya

Search: Search took 0.07 seconds.

  1. Replies
    3
    Views
    12,487

    Re: NullPointerException with JUnit Testing

    java.lang.NullPointerException
    at test.LinkedList.add(LinkedList.java:23)
    at test.LinkedListDictionary.put(LinkedListDictionary.java:18)
    at...
  2. Replies
    3
    Views
    12,487

    NullPointerException with JUnit Testing

    So I'm brushing up on my data structures and have been working on Linked Lists and Hashtables. The following method is from my Linked List class:



    public void add(String key, Model pair){
    ...
  3. Replies
    3
    Views
    1,027

    Re: ArrayIndexOutOfBounds

    Oh wow, I was assuming the array was getting initialized in the constructor but it wasn't. Stupid mistake. Fixed it and it works fine. Thanks
  4. Replies
    3
    Views
    1,027

    ArrayIndexOutOfBounds

    Ok so I'm working on this program which passes the elements on an array into an array object. It compiles but I keep getting an ArrayIndexOutOfBoundsException: 0 error.
    Its happening at...
  5. Replies
    4
    Views
    1,214

    Re: QuickSelect Help

    Ok thanks! I think I got it.
  6. Replies
    4
    Views
    1,214

    Re: QuickSelect Help

    Yeah the error message is:
    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 13
    at qselect.QSelect.quickSelect(QSelect.java:91)
    at qselect.QSelect.main(QSelect.java:33)
  7. Replies
    4
    Views
    1,214

    QuickSelect Help

    I'm work on the quickSelect algorithm to find the kth smallest integer however I keep getting the java.lang.ArrayIndexOutOfBoundsException error.



    import java.io.*;
    import...
  8. Thread: QuickSort Help

    by 3sbwya
    Replies
    3
    Views
    1,057

    Re: QuickSort Help

    The problem is that it takes roughly 25-30 min for the program to finish running. That's what I meant by bogging it down. I'm confused on whats going on within the quickSort method that's causing...
  9. Thread: QuickSort Help

    by 3sbwya
    Replies
    3
    Views
    1,057

    QuickSort Help

    I'm working on this program which uses the quickSort algorithm to sort arrays of N sizes using the median of 3 to determine the pivot. The output is to print the list the number of comparisons for...
  10. Replies
    2
    Views
    944

    Re: Problem with Random Numbers

    Thanks. That helped a ton
  11. Replies
    2
    Views
    944

    Problem with Random Numbers

    I'm working on this program where I create an array of random integers and use bubble sort to get them in order:



    package bubblesort;

    import java.util.Random;
    public class BubbleSort {

    ...
Results 1 to 11 of 11