JAVA Propose a set of 10 letters in some random order. Show the results of inser
ID: 3762996 • Letter: J
Question
JAVA
Propose a set of 10 letters in some random order. Show the results of inserting those letters, letter by letter, in that order into a heap data structure, using the array representation of the heap. Use the default lexical order, and assume that the heap should have the smallest element in the structure as the root (ie, this will be a minimum heap).
1. Submit your java file(s) : please provide the code to the homework assignment
2. test plan:***** here is an example of a test plan from a different homework assignment:*******
Test Plan with test case: The plan here is to perform some Binary tree operations. If every step works the way it should, it is running successfully.
Adding element from file : 28,32,64,89,55
bst - 28,32,64,89,55
root - 28
perform preorder traversal(root,left,right)
output - 28 32 64 55 89
perform inorder traversal(left,root,right)
output - 28 32 55 64 89
perform postorder traversal(left,right,root)
output - 55 89 64 32 28
3. demonstration of successful compilation and running for all test cases: please provide picture of the java code executing.
thank you
Explanation / Answer
Answer:
======
This snippet should be instructive:
If you want to do 3 letters at a time, then you can do something like this instead:
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.