A functions whose cost scales linearly with the size of the input - answerO(n)
Iterating over a collection of data once often indicates an ______ algorithm. (alphabet
for-loop example) - answerO(n)
A functions whose cost scales logarithmically with the input size - answerO(log n)
Which type of function works by breaking down large problem into smaller and smaller
chunks? - answerO(log n)
As the size of the input grows the cost of the algorithm does not increase at the same
rate. The overall cost of performing an operation on 1,000,000 items is only twice that of
performing the operation on 1,000 items. - answerO(log n)
A function that exhibits quadratic growth relative to the input size - answerO(n^2)
An example of this type of function is doubly nested loop - answerO(n^2)
Which type of function gets really expensive really quickly? - answerO(n^2)
A function that has two inputs that contribute to growth - answerO(nm)
An example of this type of function is when there is a nested loop that iterates of two
distinct collections of data - answerO(nm)
Are Big-O cases used in the best or worst situations? - answerWorst
Which statement is static?
readonly Contact[] contacts = new Contact[];
readonly Contact contacts = new Contacts[100]; - answerreadonly Contact contacts =
new Contacts[100];
A container where data is stored in nodes consisting of a single data item and a
reference to the next node - answerLinked List
A ______ is a container where nodes of data are linked together into a list -
answerLinked List
, Linking together complex nodes into a single structure - answerLinked List
Each link in a chain for a linked lists is called a ______ - answernode
What two things do nodes contain? - answer1. the value
2. reference to next item in the list
Give a coded example on how to create a 3 chained linked list of nodes. - answerNode
head = new Node(1);
head.Next = new Node(2);
head.Next.Next = new Node(3);
A list where we start at the first node and follow the chain of nodes iterating over each
until we get to the end - answerSingly Linked List
A list that builds on the singly linked list by adding reverse iteration. - answerDoubly
Linked List
Give a coded example on how to create a doubly linked list - answerNode node1 = new
Node(1);
Node node2 = new Node(2);
Node node3 = new Node(3);
node1.Next = node2;
node2.Previous = node1;
node2.Next = node3;
node3.Previous = node2;
The first and last nodes of a doubly linked list should have a value of ______ -
answernull
Adds a value to the beginning of the list - answerAddHead
Adds a value at the end of the linked list - answerAddTail
Finds the first node whose value equals the provided argument - answerFind
Returns true if the specified value exists in the list, false otherwise - answerContains
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller Dreamer252. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $17.99. You're not tied to anything after your purchase.