computer science discussion question and need a reference to help me learn.
See attached
Requirements: See attached file | Assembly Language
Question One
Following initial state of a queue is reflecting the implementation of a circular array. The front and back pointers are shown on the queue.
Show the queue state after each of the following operations with updating front and back pointers as required:
enqueue(23)
enqueue(95)
dequeue
dequeue
enqueue(11)
dequeue
dequeue
dequeue
Solution:
Marking Criteria: [0.25 for all points (a,b,c,d,e,f,g,h)]
Question Two
Write a Java program and screenshot of the output using Stack class to show the following points:
Create three empty stacks named stackOne, stackTwo and stackThree respectively.
Push the numbers [a, b, c, d] “for example [7, 5, 8, 22]” into stackOne and [w, x, y, z] “for example [5, 4, 2, 11]” into stackTwo. (Note: value of the numbers [a,b,c,d, etc] for each of the student should be different)
Pop the top number of stackOne and top number of stackTwo and add them. Then, push the addition result into stackThree.
Pop the top number of stackOne and top number of stackTwo and subtract them. Push the result of subtraction into stackThree.
Print StackOne, stackTwo and stackThree.
Print the largest number in stackThree
Solution:
Marking Criteria: [0.34 for all points (a,b,c,d,e,f)]
Question Three
Based on the given tree, answer the following questions:
what is the height of the tree?
what are the ancestors of node 14?
Redraw the Binary Search Tree after deleting node 10?
On the same diagram you did from C, add node 17?
Convert the given postfix expression into an expression-tree: 52+21-*
Solution:
Marking Criteria: [0.25 for (a,b)], [0.5 for (c,d,e)]
Question Four
Like numbers, strings can also be used as keys in a hash functions. A hash function for any string s = “abc” can be defined as:
Hash(abc) = (a + b + c) % tableSize
Consider the following ASCII table for different alphabets and use the hash function to create a hash table of 10 slots for the following Names using Open addressing (Linear probing to resolve collision).
Names: ahmed, samir, saad, yazeed, raed, sultan, salman, azzam, saleh, hamad.
Explain the steps showing your work in detail.
Answer:
Marking Criteria [0.22 for each correct name slots]
We are a professional custom writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework.
Yes. We have posted over our previous orders to display our experience. Since we have done this question before, we can also do it for you. To make sure we do it perfectly, please fill our Order Form. Filling the order form correctly will assist our team in referencing, specifications and future communication.
1. Click on the “Place order tab at the top menu or “Order Now” icon at the bottom and a new page will appear with an order form to be filled.
2. Fill in your paper’s requirements in the "PAPER INFORMATION" section and click “PRICE CALCULATION” at the bottom to calculate your order price.
3. Fill in your paper’s academic level, deadline and the required number of pages from the drop-down menus.
4. Click “FINAL STEP” to enter your registration details and get an account with us for record keeping and then, click on “PROCEED TO CHECKOUT” at the bottom of the page.
5. From there, the payment sections will show, follow the guided payment process and your order will be available for our writing team to work on it.
Need this assignment or any other paper?
Click here and claim 25% off
Discount code SAVE25