• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/19

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

19 Cards in this Set

  • Front
  • Back
  • 3rd side (hint)

O(1)

an algorithm that will always execute in the same time, regardless of the size of the input data set

constant

O(n)

an algorithm whose performance grows linearly in direct proportion to the size of input data set

linear

o(n^2)

an algorithm whose performance is directly proportional to the square of the size of the input data set

square

o(2^n)

an algorithm whose growth doubles with each addition to input data set

exponential

Abstract Data Type (ADT)

a mathematical spec. of a set of data and set of operations that can be performed on that data. we don't know how it's implemented.


typical examples are String, List, Stack, Queue

Collection

An object that contains a group of objects, typically a fixed type. each object in a collection is an element

Collection categories

unordered


linear (elements are arranged logically in a straight line with each element followed by a unique element)


nonlinear(elements arranged hierarchically or in a network)

bounded collections

there is a limit to the number of elements the collection can contain

unbounded collection

there is no limit on the size of the collection

stacks

linear collection who'd elements can be added or removed from one end


LIFO (last in first out)

Stack operations

isEmpty()


size()


push()


pop()


peek()

Queues

linear data structure with opening at each end elements added at one end and removed from the other


FIFO (first in first out)

Queue operations

enqueue()


dequeue()


first()


isEmpty()


size()

Set

a collection of distinct (unique) objects of a particular type


unordered


any element can appear only once

Set operations

add() addAll()


remove() removeAll()


retainAll()


contains()


union()


intersection()


difference()


equals()


isSubset()


Map

maps a set of keys to a set of values

map operations

add()


reassign()


remove()


lookup()


linked structure

uses object references to link one object to another


each object is a node


dynamic - May grow or shrink as needed


LinearNode<T> operations

a linked list is made up of a linear collection of nodes


T getElement()


setElement()


LinearNode<T> getNext()


setNext()