Get Instant Help From 5000+ Experts For
question

Writing Get your essay and assignment written from scratch by PhD expert

Rewriting: Paraphrase or rewrite your friend's essay with similar meaning at reduced cost

Editing:Proofread your work by experts and improve grade at Lowest cost

loader
Phone no. Missing!

Enter phone no. to receive critical updates and urgent messages !

Add File

Error goes here

Files Missing!

Please upload all relevant files for quick & complete assistance.

Guaranteed Higher Grade!

AVL Tree: Height-Balanced Binary Search Tree Implementation With Examples

6 Pages / 1,419 Words Published On: 21-11-2020

What is AVL tree?

Write three functions in C or C++, that determine if a tree is balanced, and are able to balance a tree. Function prototypes are as follows: int isBalanced(BSTHead *mytree) void rotateLeft(Node *pPre)
void rotateRight(Node *pPre)
Function isBalanced will return 0 if it is balanced, -1 if height on left subtree is larger than height on right subtree, and 1 if height on left subtree is smaller than height on right subtree. BSTHead is a defined type for the head of a BST.
For rotateLeft and rotateRight, a reference to the parent node of node to be rotated is passed as parameter. Hint: To be able to rotate you may need the memory address of both, the node to be rotated and its parent You may create additional functions, as needed.

Delivery:
- The submission of your source code is required. Copyright on code will be honoured.
- One document (pdf, md, doc, …) with the name of the project, a description of it,
author name and instructions to use the code (when required).


Assessment Criteria
Your project will be assessed based on the following set of assessment criteria. Assessment category Assessment Criteria Marks isBalanced function Function determines if a BST is balanced or not.Returns -1, 0 and 1 as described.


rotateLeft Function rotates left 3 rotateLeft Function may do a double rotation: right-left 5 rotateRight Function rotates right 3 rotateRight Function may do a double rotation: left-right 5
Late Submission of Assignments
Assignments submitted after the due date and time without having received an extension through

Special Assessment Circumstances (SAC) will be penalised according to the following:
10% of marks deducted if submitted within 24hrs of the deadline 20% of marks deducted if submitted after 24hrs and up to 48hrs of the deadline 30% of marks deducted if submitted after 48hrs and up to 72hrs of the deadline No grade will be awarded for an assignment that is submitted later than 72hrs after the deadline Assignments handed in more than 72 hours late will not be marked unless Special
Assessment Circumstances apply. So, it is better to hand in an incomplete assignment on time.

Special Assessment Circumstances
A student, who due to circumstances beyond his or her control, misses a test, final exam or an assignment deadline or considers his or her performance in a test, final exam or an assignment to have been adversely affected, should complete the Special Assessment Circumstances (SAC) form available from Student Central.

Within any semester, a student may have only one SAC per course. When requesting an SAC for an assignment, the SAC application form must be submitted (along with the work completed to date) within the time frame of the extension requested; i.e. if the Doctor’s certificate is for one (1) day, then the SAC application form and work completed must be submitted within one (1) day. Assistance to other Students Students themselves can be an excellent resource to assist the learning of fellow students, but there are issues that arise in assessments that relate to the type and amount of assistance given by students to other students. It is important to recognise what types of assistance are beneficial to another’s learning and also what types of assistance are unacceptable in an assessment.

Beneficial Assistance
• Study Groups.
• Discussion.
• Sharing reading material.
• Testing another student’s programming work using the executable code and giving them the results of that testing.
Unacceptable Assistance
• Working together on one copy of the assessment and submitting it as own work.
• Giving another student your work.
• Copying someone else’s work. This includes work done by someone not on the course.
• Changing or correcting another student’s work.
• Copying from books, Internet etc. and submitting it as own work.

Anything taken directly from another source must be acknowledged correctly: show the source alongside the uotation. Do you want to do the best that you can do on this assignment and improve your grades? You could:
• Talk it over with your lecturer
• Visit Te Tari Awhina or Maia for learning advice and support
• Visit the Centre for Pacific Development and Support
• Contact the USU Advocate for independent advice 

Cite This Work

To export a reference to this article please select a referencing stye below:

My Assignment Help. (2020). AVL Tree: Height-Balanced Binary Search Tree Implementation With Examples. Retrieved from https://myassignmenthelp.com/free-samples/iscg-6426-data-structures-and-algorithms/deletion-and-searching.html.

"AVL Tree: Height-Balanced Binary Search Tree Implementation With Examples." My Assignment Help, 2020, https://myassignmenthelp.com/free-samples/iscg-6426-data-structures-and-algorithms/deletion-and-searching.html.

My Assignment Help (2020) AVL Tree: Height-Balanced Binary Search Tree Implementation With Examples [Online]. Available from: https://myassignmenthelp.com/free-samples/iscg-6426-data-structures-and-algorithms/deletion-and-searching.html
[Accessed 04 October 2023].

My Assignment Help. 'AVL Tree: Height-Balanced Binary Search Tree Implementation With Examples' (My Assignment Help, 2020) <https://myassignmenthelp.com/free-samples/iscg-6426-data-structures-and-algorithms/deletion-and-searching.html> accessed 04 October 2023.

My Assignment Help. AVL Tree: Height-Balanced Binary Search Tree Implementation With Examples [Internet]. My Assignment Help. 2020 [cited 04 October 2023]. Available from: https://myassignmenthelp.com/free-samples/iscg-6426-data-structures-and-algorithms/deletion-and-searching.html.


Stuck on Any Question

Our best expert will help you with the answer of your question with best explanation.

question

Writing: Get your essay and assignment written from scratch by PhD expert

Rewriting: Paraphrase or rewrite your friend's essay with similar meaning at reduced cost

Editing: Proofread your work by experts and improve grade at Lowest cost

question
We will use e-mail only for:

arrow Communication regarding your orders

arrow To send you invoices, and other billing info

arrow To provide you with information of offers and other benefits

Phone no. Missing!

Enter phone no. to receive critical updates and urgent messages !

loader
250 words
Error goes here

Error goes here

Files Missing!

Please upload all relevant files for quick & complete assistance.

icon
5% Cashback

On APP - grab it while it lasts!

Download app now (or) Scan the QR code

*Offer eligible for first 3 orders ordered through app!

screener
ribbon
callback request mobile
Have any Query?
close
Subtraction Payment required!

Only one step away from your solution of order no.