Examlex

Solved

(A) Set Up a Binary Tree for the Following List

question 18

Essay

(a) Set up a binary tree for the following list, in the given order, using alphabetical ordering: SHE, SELLS, SEA, SHELLS, BY, THE, SEASHORE.
(b) How many comparisons with words in the tree are needed to determine if the word SHARK is in the tree?
(c) How many comparisons with words in the tree are needed to determine if the word SEAWEED is in the tree?
(d) How many comparisons with words in the tree are needed to determine if the word SHELLS is in the tree?


Definitions:

Melatonin

A substance secreted by the pineal gland that controls the patterns of sleeping and waking.

Dopamine

A neurotransmitter associated with pleasure, movement, and attention in the brain.

Cortisol

Cortisol is a steroid hormone released by the adrenal glands in response to stress and has multiple functions including regulating metabolism and immune response.

Leptin

A hormone produced by adipose (fat) cells that helps to regulate energy balance by inhibiting hunger, which in turn diminishes fat storage in adipocytes.

Related Questions