100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
WGU C949 Competency study guide Exam test questions with approved Answers 2024/2025 $11.49   Add to cart

Exam (elaborations)

WGU C949 Competency study guide Exam test questions with approved Answers 2024/2025

 0 view  0 purchase
  • Course
  • WGU C949 Data Structure and Algorithm
  • Institution
  • WGU C949 Data Structure And Algorithm

WGU C949 Competency study guide Exam test questions with approved Answers 2024/2025 Array in java - correct answer generic class that supports different data types. Declared as follows, where t is the data type. Tuple - correct answer sequence type: an immutable container with ordered element...

[Show more]

Preview 3 out of 26  pages

  • November 12, 2024
  • 26
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • WGU C949 Data Structure and Algorithm
  • WGU C949 Data Structure and Algorithm
avatar-seller
KieranKent55
WGU C949 Competency study guide Exam
test questions with approved Answers
2024/2025


Array in java - correct answer generic class that supports
different data types. Declared as follows, where t is the data
type.


Tuple - correct answer sequence type: an immutable
container with ordered elements.


Stack - correct answer an adt in which items are only
inserted on or removed from the top of a stack.
*last-in first-out


Underlying data structures: linked list


Push(stack, x), pop(stack), peek(stack), isempty(stack),
getlength(stack)


*pop & peek should not be used on a empty stack.


Stack operations - correct answer example starting with
stack: 99, 77 (top is 99).


Push(stack, x)
Inserts x on top of stack

,Push(stack, 44). Stack: 44, 99, 77


Pop(stack)
Returns and removes item at top of stack
Pop(stack) returns: 99. Stack: 77


Peek(stack)
Returns but does not remove item at top of stack
Peek(stack) returns 99. Stack still: 99, 77


Isempty(stack)
Returns true if stack has no items
Isempty(stack) returns false.


Getlength(stack)
Returns the number of items in the stack
Getlength(stack) returns 2.


Implementing a stack in python (linear data structure) - correct
answer can be implemented in python using a class with a
single linkedlist data member.
The class has two methods, push() and pop().


Push() adds a node to the top of the stack's list by calling
linkedlist's prepend() method.

, *new elements are place on the top of the stack, not at the
bottom of the stack.


Pop() removes the head of the stack's list by calling the
linkedlist's remove_after() method and then returns the removed
node.


Implementing a queue in python (linear data structure) -
correct answer can also be implemented in python using a
class with a single linkedlist data member and class methods
push() and pop().


Push() adds a node to the end of the queue's list by calling
linkedlist's append() method.
*new elements are added to the end of a queue.


The pop() method removed the queue's head node and is
identical to stack's pop() method.


Queue - correct answer an adt in which items are inserted at
the end of the queue and removed from the front of the queue.


*first-in first-out adt.


Underlying data structures: linked list, array, vector


The queue class' push() method uses the linkedlist append()
method to insert elements in a queue.

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

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

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

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 KieranKent55. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $11.49. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

80467 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$11.49
  • (0)
  Add to cart