100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

WGU C949 Data Structures and Algorithms Exam with complete solutions

Rating
-
Sold
-
Pages
7
Grade
A+
Uploaded on
03-06-2023
Written in
2022/2023

A functions whose cost scales linearly with the size of the input - Answer- O(n) Iterating over a collection of data once often indicates an ______ algorithm. (alphabet for-loop example) - Answer- O(n) A functions whose cost scales logarithmically with the input size - Answer- O(log n) Which type of function works by breaking down large problem into smaller and smaller chunks? - Answer- O(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. - Answer- O(log n) A function that exhibits quadratic growth relative to the input size - Answer- O(n^2) An example of this type of function is doubly nested loop - Answer- O(n^2) Which type of function gets really expensive really quickly? - Answer- O(n^2) A function that has two inputs that contribute to growth - Answer- O(nm) An example of this type of function is when there is a nested loop that iterates of two distinct collections of data - Answer- O(nm) Are Big-O cases used in the best or worst situations? - Answer- Worst Which statement is static? readonly Contact[] contacts = new Contact[]; readonly Contact contacts = new Contacts[100]; - Answer- readonly 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 - Answer- Linked List A ______ is a container where nodes of data are linked together into a list - Answer- Linked List Linking together complex nodes into a single structure - Answer- Linked List Each link in a chain for a linked lists is called a ______ - Answer- node What two things do nodes contain? - Answer- 1. 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. - Answer- Node 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 - Answer- Singly Linked List A list that builds on the singly linked list by adding reverse iteration. - Answer- Doubly Linked List Give a coded example on how to create a doubly linked list - Answer- Node 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 ______ - Answer- null Adds a value to the beginning of the list - Answer- AddHead Adds a value at the end of the linked list - Answer- AddTail Finds the first node whose value equals the provided argument - Answer- Find Returns true if the specified value exists in the list, false othe

Show more Read less
Institution
WGU C949
Course
WGU C949









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
WGU C949
Course
WGU C949

Document information

Uploaded on
June 3, 2023
Number of pages
7
Written in
2022/2023
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

  • wgu c949

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Gordones22 Yala university
View profile
Follow You need to be logged in order to follow users or courses
Sold
492
Member since
3 year
Number of followers
351
Documents
9477
Last sold
3 weeks ago

4.1

107 reviews

5
63
4
16
3
13
2
4
1
11

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions