Big Oh Notation ArrayList class LinkedList class
const int DEFAULT_CAPACITY = 50000;
template
<typename Element>
class ArrayList
{
public:
Element buf[];
int length;
ArrayList(int capacity = DEFAULT_CAPACITY)
{
}
void insert( Element x )
{
}
void remove( Element x )
{
}
int findIndexOf( Element x )
{
}
Element objectAt( int i )
{
}
int length()
{
}
bool equals( ArrayList l )
{
}
void print( ostream & out )
{
}
~ArrayList()
{
}
};
template
<typename Element>
class LinkedList
{
struct ListNode
{
Element info;
ListNode * next;
ListNode(Element newInfo, ListNode * newNext)
{
info = newInfo;
next = newNext;
}
};
ListNode * head;
public:
LinkedList()
{
}
void insert( Element x )
{
}
void remove( Element x )
{
}
int findIndexOf( Element x )
{
}
Element objectAt( int i )
{
}
int length()
{
}
bool equals( LinkedList l )
{
}
void print( ostream & out )
{
}
~LinkedList()
{
}
};