100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
CSE 2221 Final A Grade Exam | Study Questions Solved 100% Correct $12.49   Add to cart

Exam (elaborations)

CSE 2221 Final A Grade Exam | Study Questions Solved 100% Correct

 0 view  0 purchase
  • Course
  • CSE 2221
  • Institution
  • CSE 2221

CSE 2221 Final A Grade Exam | Study Questions Solved 100% Correct

Preview 2 out of 9  pages

  • September 7, 2024
  • 9
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • CSE 2221
  • CSE 2221
avatar-seller
KenAli
CSE 2221 Final A Grade Exam | Study
Questions Solved 100% Correct
What kind of loop can use on sets? - ANSWER A for:each loop, where you check each item in a
set.



Why is using a for:each loop dangerous? - ANSWER You can't change either the set or
the variable that is being iterated through.


What do the "||" symbols denote? - ANSWER The size of something, usually a set.



Stack - ANSWER Allows you to manipulate strings of entries of any type. Can only add
or remove the front or back item in the Stack. Objects in stacks are in a certain order.


sti.push(v) - ANSWER Adds v to the front of the stack sti.


sti.pop() - ANSWER Removes and returns the item in the front of the stack sti.


sti.length() - ANSWER Returns the length of the stack sti.


sti.top() - ANSWER Returns the item in the top or the front of the stack sti without removing it.

, sti.replaceTop(v) - ANSWER Replaces the front value in the stack sti and returns the old value.



sti.flip() - ANSWER Reverses the stack order.



Map - ANSWER Holds a set of pairs of values of any type. There is no order in a Map, and you
can only add or remove items from it by calling on certain items.


mi.add(k, v) - ANSWER Adds the pair k, v to the map mi.


mi.remove(v) - ANSWER Removes and returns the pair from the map mi at the key v.


mi.removeAny() - ANSWER Randomly removes and returns a pair from the map mi.


mi.value(v) - ANSWER Returns the value at the key v.


mi.hasKey(v) - ANSWER Returns whether or not map mi has the key value v.


mi.size() - ANSWER Returns the amount of pairs in the map mi.


mi.replaceValue(k, v) - ANSWER Replaces and returns the value at the key k with the value v.


mi.key(v) - ANSWER Returns the key at the value v.


mi.hasValue(v) - ANSWER Returns whether or not the map mi has the value v within it.


mi.combineWith(mi2) - ANSWER Combines map mi with map mi2.

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

Will I be stuck with a subscription?

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

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

73243 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
$12.49
  • (0)
  Add to cart