Question: from AVLNode import AVLNodeclass ExtendedAVLNode ( AVLNode ) : def _ _ init _ _ ( self , node _ key ) : super (
from AVLNode import AVLNodeclass ExtendedAVLNodeAVLNode:def initself nodekey:superinitnodekeyselfsubtreekeycount updatesubtreekeycountselfnodekeydef getsubtreekeycountself:return self.subtreekeycountdef updatesubtreekeycountselfkey:leftcount self.left.getsubtreekeycountkeyrightcount self.right.getgetsubtreekeycountkeysubTreeKeyCount leftcount rightcount return subTreeKeyCountTest insertion and GetSubtreeKeyCount Inserting keys: Runtime error while executing test case Test insertion, removal, and GetSubtreeKeyCount Inserting keys: Runtime error while executing test case Test insertion, removal, GetSubtreeKeyCount and GetNthKey Inserting keys: Runtime error while executing test case Summary: Test : FAIL Test : FAIL Test : FAILPlease help with error, only change ExtendAVLNode.py Program output displayed here
Test insertion and GetSubtreeKeyCount
Inserting keys:
PASS: Inorder key verification
Expected:
Actual:
FAIL: Node with key has a subtree count of but the expected subtree key count is
PASS: Node with key has a subtree key count of
FAIL: Node with key has a subtree count of but the expected subtree key count is
PASS: Node with key has a subtree key count of
FAIL: Node with key has a subtree count of but the expected subtree key count is
FAIL: Node with key has a subtree count of but the expected subtree key count is
PASS: Node with key has a subtree key count of
Test insertion, removal, and GetSubtreeKeyCount
Inserting keys:
PASS: Inorder key verification
Expected:
Actual:
FAIL: Node with key has a subtree count of but the expected subtree key count is
PASS: Node with key has a subtree key count of
FAIL: Node with key has a subtree count of but the expected subtree key count is
PASS: Node with key has a subtree key count of
FAIL: Node with key has a subtree count of but the expected subtree key count is
PASS: Node with key has a subtree key count of
FAIL: Node with key has a subtree count of but the expected subtree key count is
PASS: Node with key has a subtree key count of
FAIL: Node with key has a subtree count of but the expected subtree key count is
FAIL: Node with key has a subtree count of but the expected subtree key count is
PASS: Node with key has a subtree key count of
Test insertion, removal, GetSubtreeKeyCount and GetNthKey
Inserting keys:
PASS: Inorder key verification
Expected:
Actual:
FAIL: getnthkey returned but expected key is
Surmary:
Test : FAIL
Test : FAIL
Test : FAIL
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
