Question: QUESTION 8 In the _____ traversal, the root is processed first,before its subtrees. breadth first preorder postorder inorder 0.10000 points QUESTION 9 What kind of

QUESTION 8

  1. In the _____ traversal, the root is processed first,before its subtrees.

    breadth first

    preorder

    postorder

    inorder

0.10000 points

QUESTION 9

  1. What kind of traversal does the following algorithm (inpseudo-code) describe?

    Algorithm traversal (root)

    if (root is not null)

    traversal(leftSubTree)

    process(root)

    traversal(rightSubTree)

    end if

    end traversal

    breadth first

    preorder

    inorder

    postorder

0.10000 points

QUESTION 10

  1. What kind of traversal does thefollowing algorithm (inpseudo-code) describe?

    Algorithm traversal (root)

    if (root is not null)

    traversal (leftsubtree)

    traversal (rightsubtree)

    process(root)

    end if

    end traversal

    inorder

    breadth first

    preorder

    postorder

0.10000 points

QUESTION 11

  1. An AVL tree is a search tree in which the heights ofthe subtrees differ by no mor

    0

    1

    3

    2

0.10000 points

QUESTION 12

  1. A binary search tree (BST) is a binary tree with the followingproperties:

    - All items in the left subtree areless than the root.

    - All items in the right subtree are greater than or equal tothe root.

    - ________________.

    The tree is balanced

    Each subtree is complete

    Each subtree is balanced

    Each subtree itself is a binary search tree

0.10000 points

QUESTION 13

  1. What operation does the following BST algorithm (in pseudo-code)describe?

    Algorithm aBSTAlgorithm (root)

    if (left subtree empty)

    return (root)

    else

    returnaBSTAlgorithm (left subtree)

    end if

    end aBSTAlgorithm

    find a requested node

    inorder traversal

    find the largest node

    find the smallest node

0.10000 points

QUESTION 14

  1. What operation dos the following BST algorithm (inpseudo-code) describe?

    Algorithm aBSTAlgorithm (root)

    if (right subtree empty)

    return (root)

    else

    returnaBSTAlgorithm (right subtree)

    end if

    end aBSTAlgorithm

    find the largest node

    inorder traversal

    find the smallest node

    find a requested node

0.10000 points

QUESTION 15

  1. What operation does the following BST algorithm (inpseudo-code) describe?

    Algorithm aBSTAlgorithm (root,targetKey)

    if (empty tree)

    return null

    end if

    if (targetKey < root)

    returnaBSTAlgorithm (left subtree, targetKey)

    else if (targetKey >root)

    returnaBSTAlgorithm (right subtree, targetKey)

    else

    return root

    end if

    end aBSTAlgorithm

    find the smallest node

    inorder traversal

    find the largest node

    find a requested node

Step by Step Solution

3.51 Rating (151 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The detailed answer for the above question is provided below Question 8 The answer is preorder Expla... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!