• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 8 pages
Exam (elaborations)

CSCI 340 – Exam 2 Study Guide

Document preview thumbnail
Preview 2 out of 8 pages

CSCI 340 Exam 2, focusing on tree structures and related algorithms. It covers binary trees, binary search trees (BST), AVL trees (definitions, balance factors, rotations), threaded binary trees, and tree traversals (inorder, preorder, postorder) with recursive and nonrecursive code examples. It also reviews binary heaps (max heap, min heap), complete and almost complete binary trees, and STL algorithms such as push_heap and pop_heap. Additional content includes array vs. linked representations of trees and traversal logic with references to visual diagrams

Content preview

AVL Example


Give this one a try later!


http://www.qmatica.com/DataStructures/Trees/AVL/AVLTree.html




Recursive Inorder Travesal Code

, Give this one a try later!


template <class T>
void BTree<T>::inorder(Node<T>* p) const
{
if (p != nullptr)
{
inorder(p->left);
cout << p->data << ' ';
inorder(p->right);
}
}




AVL Tree Insertion


Give this one a try later!


https://webcourses.niu.edu/bbcswebdav/pid-3845215-dt-content-rid-
23256520_2/courses/20152-CSCI-340-----2/AVL%20Trees.pdf




Binary Tree


Give this one a try later!


A binary tree consists of a finite set of nodes that is either empty, or
consists of one specially designated node called the root of the binary
tree, and the elements of two disjoint binary trees called the left subtree
and right subtree of the root.




In-Order

Document information

Uploaded on
September 6, 2025
Number of pages
8
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$10.50

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

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.
BestKey
4.2
(119)
Sold
299
Followers
108
Items
8950
Last sold
3 days ago




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

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions