task 1:Draw all the steps to sort this array. Use a selection sort: dogbatantcatCreate a word processor document that is named task1.rtf or task1.docx or ...In the task1 document, create the following...

1 answer below »
task 1:Draw all the steps to sort this array. Use a selection sort:


dogbatantcatCreate a word processor document that is named task1.rtf or task1.docx or ...In the task1 document, create the following drawings and descriptions: One drawing and description for the initial list of words. There are lots of different ways to create a drawing: Use pencil and paper. A scanner can convert the drawing into an electronic file. Use a paint program such as Microsoft paint. Use Excel or PowerPoint or Word. All 3 have drawing tools. Whenever the top of the array is found and the smallest element is found, create a drawing and a description. Tell me if the 2 elements are or are not in the correct positions. If the top and smallest are the same element, please tell me. For each swap, create 3 drawings. Write a description for each drawing. a drawing and a description showing the list BEFORE the swap a drawing and a description using arrows to show the swap a drawing and a description showing the list AFTER the swap Create one drawing and description for the final list of words.
My solution contains 12 drawings. Each of my drawings have a description. initial list finding the top and smallest a drawing before the swap, a drawing showing the swap, a drawing after the swap finding the top top and smallest finding the top and smallest a drawing before the swap, a drawing showing the swap, a drawing after the swap finding the top and smallest final list I will be expecting to see 12 or more drawings. I will be expecting to see a description for each and every drawing.If I don't see 12 or more drawings, I may not grade your work.
Here are some ways to show the top of the array and the smallest element in the array. Choose one of these ideas or come up with your own idea.


Begin photoThree drawings to show 4 different ideas on how to draw the selection of 2 elements in an empty array.The first drawing shows 2 elements with a yellow background color.The second drawing shows 2 elements with a * next to them.The third drawing shows 2 elements with an arrow next to them.The fourth drawing shows a half circle connecting 2 elements.End photo
Here is a good way to show a swap. Notice that a swap contains 3 drawings: before, swap, afterNotice that each drawing has a description.
Begin photoThree drawings showing the 1) before a swap, 2) swap, and 3) after the swap.The before-swap drawing shows an array that contains 4 empty elements. Above the array is the words Before Swap.The drawing showing the swap shows two empty arrays. Each array contains 4 elements.An arrow goes from the top of the left array to the bottom of the right arrayAn arrow goes from the bottom of the left array to the top of the right array.At the top of the drawing are the words Swap.The after-swap drawing shows an array that contains 4 empty elements. Above the array is the words After Swap.End photo


task 2:Draw all the steps to sort this array. Use a bubble sort. BUBBLE UP from the bottom of the array to the top of the array. yellow blue green
Create a word processor document that is named task2.rtf or task2.docx or ...In the task2 document, create the following drawings and descriptions: Create one drawing and description for the initial list of words. Each time two adjacent elements are selected, create a drawing and a description. Tell me why you are picking these 2 elements. Tell me how do you know to pick these 2 elements. Tell me if the 2 elements are or are not in their correct positions. For each swap, create 3 drawings. Write a description for each drawing. a drawing and a description showing the list BEFORE the swap a drawing and a description using arrows to show the swap a drawing and a description showing the list AFTER the swap Each time a new lock is drawn, create a drawing and a description.
My solution contains 14 drawings. Each of my drawings have a description. Each pick has an explanation on why the 2 elements are picked. initial list picking 2 elements picking 2 elements a drawing before the swap, a drawing showing the swap, a drawing after the swap locking the top element(s) picking 2 elements a drawing before the swap, a drawing showing the swap, a drawing after the swap locking the top element(s) a drawing showing one element below the lock final listI will be expecting to see 14 or more drawings. I will be expecting to see a description for each and every drawing. I most definitely will be looking for an explanation on how you picked the 2 elements that are currently bubbling up.If I don't see 14 or more drawings, then I may not grade your work. If I do NOT see explanations on how you picked the 2 elements to bubble up, then I may not grade your work.
Here is a good way to show a lock:




Begin photoAn array with 4 empty cells. There is thick horizontal line on the border between the top element and the second element.End photo


Here is a good way to show the picking of 2 elements. Please remember to include an explanation on why you picked the 2 elements.






Begin photo An array with 4 empty cells. A half circle connects 2 elements.End photo
Here is a good way to show a swap. Notice that a swap contains 3 drawings: before the swap, the actual swap, after the swapNotice that each drawing has a description.




Begin photoThree drawings showing the 1) before a swap, 2) swap, and 3) after the swap.The before-swap drawing shows an array that contains 4 empty elements. Above the array is the words Before Swap.The drawing showing the swap shows two empty arrays. Each array contains 4 elements.An arrow goes from the top of the left array to the bottom of the right arrayAn arrow goes from the bottom of the left array to the top of the right array.At the top of the drawing are the words Swap.The after-swap drawing shows an array that contains 4 empty elements. Above the array is the words After Swap.End photo




task 3: stackCreate a word processor document that is named task3.rtf or task3.docx or ...In the task3 file, draw diagrams to illustrate the following stack operations. * Please begin your illustrations with an empty stack. Please do spend the time to think of a way to show an empty stack. * push "A" (Draw a diagram of what your stack will look like AFTER the push.) * push "B" (Draw a diagram of what your stack will look like AFTER the push.) * pop (Draw a diagram of what your stack will look like AFTER the pop. Please show which element is popped off the stack.)
My solution contains 4 drawings. Each drawing contains a stack pointer.


task 4: queueCreate a word processor document that is named task4.rtf or task4.docx or ...In task4 file, draw diagrams to illustrate the following queue operations. * Please begin your illustrations with an empty queue. Please do spend the time to think of a way to show an empty queue. * enqueue "A" (Draw a diagram of what your queue will look like AFTER the enqueue.) * enqueue "B" (Draw a diagram of what your queue will look like AFTER the enqueue.) * dequeue (Draw a diagram of what your queue will look like AFTER the dequeue. Please show which element is dequeued off the queue.)
My solution contains 4 drawings. Each drawing contains a head pointer and a tail pointer.


task 5: linked listCreate a word processor document that is named task5.rtf or task5.docx or ...In task5 file, draw diagrams to illustrate the following linked list operations. * Please begin your illustrations with an empty linked list. Please do spend the time to think of a way to show an empty linked list. * insert "A" (Draw a diagram of your linked list) * insert "B" at the head of the linked list (Draw a diagram of your linked list) * remove the element at the head of the linked list (Draw a diagram of your linked list. Please show which element is removed.)
My solution contains 4 drawings. Each drawing contains a head pointer.
task 6: binary treeCreate a word processor document that is named task6.rtf or task6.docx or ...In task6 file, draw diagrams to illustrate the following binary tree operations. * Please begin your illustrations with an empty binary tree. * insert "orange" (Draw a diagram of your binary tree) * insert "gold" (Draw a diagram of your binary tree) HINT: since "gold" is alphabetically smaller than "orange", you want to go left * insert "purple" ((Draw a diagram of your binary tree) HINT: since "purple" is alphabetically larger than "orange", you want to go right
My solution contains 4 drawings.
I will not grade any drawing where the font size is smaller than 12. Be sure to crop your images so that the size of the text doesn't shrink below 12.


Deliverables:6 files. Each file contains drawings.Instead of turning in several files, you may want to consider turning in one zip file that contains all your files. Do NOT use 7z nor rar nor tar nor tar.gz.
I STRONGLY recommend checking your Canvas submission: insert a blank USB flash drive into your computer launch Canvas download your uploaded file(s) onto the USB flash drive open the uploaded file(s) and verify that they look ok
If you need help, you can come to a lab session.
Answered Same DayMar 03, 2021

Answer To: task 1:Draw all the steps to sort this array. Use a selection sort: dogbatantcatCreate a word...

Ali Asgar answered on Mar 04 2021
158 Votes
Task 1.docx
Task 1
Selection Sort:
The initial list of words contain Dog, Bat, Ant, Cat in the same order.
It is represented in above image Image1
(
N[
1]
)
We can denote this list as an array N[]. Thus N[1] is the Top most element.
We can use a new
value SM to hold the smallest value for comparison.
The Red dotted line denotes the start of array for parsing. In the first parse it will be at the top i.e. N[1].
Sort algorithm:
We follow below steps:
Step1: We can assign SM the value of N[1] initially and compare the value of SM to remaining values in the array N[].
Step2. When we find a smaller value then SM in any index of N[], value of SM is replaced with N[x], the value of N [] at current index.
Step3. Once the entire array is parsed in this manner and we find the smallest value in the array, the top value i.e. N[1] and the value N[x] are swapped. This operation puts the smallest value of the array at N[1].
Step4. The top index is then shifted to N[2] and the steps 1-3 are repeated.
This traversal and swapping is repeated till the top index is at N[n-1] that is all but one smallest value has been put in its correct value.
We do not process the N[n] value because it is the only remaining value.
Sort Algorithm for our Initial Word List:
The image 1 shows our initial list containing words Dog, Bat, Ant and Cat in unsorted order.
The Image 2 Shows the initial operation of assigning SM with value of N[1], in this case SM is assigned value ‘Dog’.
The system then parses the array to find lowest value in N[].
The Image 3 shows the parse and find operation. After this operation, the value of SM is ‘Ant’ and it is the smallest value in entire N[]. The value of ‘Ant’ is at N[3] for our example.
Now the system performs swap operation.
1. Before Swap:
The before swap positions of elements ‘Dog’ and ‘Ant’
2. Swap:
The swapping operation.
3. After Swap:
The result of swapping.
After the First Parse, the parse staring position (denoted by red line) is advanced to the next i.e. N[2].
The earlier parse process is repeated.
The smallest value in the remaining array is found to be ‘Bat’ at N[2].
But since it is already at the correct position (start position of the parse), the swap operation is not performed this time.
After the second Parse, the parse staring position (denoted by red line) is advanced to the next i.e. N[3].
The earlier parse process is repeated again.
The Image 10 shows the parse and find operation. After this operation, the value of SM is ‘Cat’ and it is the smallest value in remaining N[]. The value of ‘Cat’ is at N[4] for our...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here