100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
CSC148 Exam Study Guide Questions with Complete solutions (A Graded $12.79   Add to cart

Exam (elaborations)

CSC148 Exam Study Guide Questions with Complete solutions (A Graded

 0 view  0 purchase
  • Course
  • CSC148
  • Institution
  • CSC148

CSC148 Exam Study Guide Questions with Complete solutions (A Graded

Preview 2 out of 8  pages

  • September 7, 2024
  • 8
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • CSC148
  • CSC148
avatar-seller
KenAli
CSC148 Exam Study Guide Questions with
Complete solutions (A Graded)
depth of a nested list - ANSWER the maximum number of times a list is nested inside other lists


partial tracing - ANSWER -> trace the base case
-> trace the recursive step while assuming it will return the correct answer



design recipe for recursive functions - ANSWER -> determine the recursive structure of the
input, then use an appropriate code template
-> implement code for base cases


a tree is either - ANSWER empty or has a root value, or subtrees


size of a tree - ANSWER the total number of values in a tree


a leaf - ANSWER a value with no subtrees


height of subtree - ANSWER longest path from root to one of its leaves


children of a value - ANSWER all values directly connected underneath that value


descendants of a value - ANSWER all values beneath the value


parent - ANSWER value immediately above & connected to a value

, ancestors - ANSWER all values that come before a value



preconditions for trees - ANSWER if root is none, the tree is empty
if root is none then subtrees is empty



error that is encountered when we delete a value by promoting its subtrees - ANSWER if that
value is a leaf, then we create an empty subtree - which is not allowed



binary search tree - ANSWER every item is greater than all items in its left subtree and less than
all items in its right subtree


binary search tree structure - ANSWER if root is none, left and right are none


if root is not none, left and right are either noneor a tree


pre-order traversal - ANSWER dealing with the root before its subtrees


post order traversals - ANSWER processing the root after its subtrees


what abstract data type is a tree - ANSWER multiset


a tree of height h can have at least how many items - ANSWER 2^h - 1



range of size of a binary search tree - ANSWER at largest -> n
smallest -> log(n)


run time of sorted list | search, insert, delete - ANSWER search: worst case is O(logn)

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.79. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

79064 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.79
  • (0)
  Add to cart