Search:

Type: Posts; User: javapenguin

Search: Search took 0.30 seconds.

  1. Replies
    10
    Views
    1,815

    Re: Just a simple question

    Wait, you're right. I was looking at some data for TreeSet by mistake.
  2. Replies
    10
    Views
    1,815

    Re: Just a simple question

    I meant for accessing an ArrayList, it's 0(1) for any element.

    LinkedList, for element n/2, it'd be O(n/2) or shortened to O(n)

    Sorting is (at worst) O(log2(n)) for ArrayList

    and O(n) for...
  3. Replies
    10
    Views
    1,815

    Re: Just a simple question

    Also, ArrayList has to be in the same place in memory, just like arrays, (i.e. all the values in the ArrayList have to be right next to each other in memory.) That can cause you to have an...
Results 1 to 3 of 3