2. (a) Determine whether the array of data {23, 17, 14, 6, 13, 10, 1, 5, 7, 12} is a (min/max) heap or not.
Q: Computer science What are the advantages of using a link list instead of an array?
A: Introduction: What are the advantages of using a link list instead of an array?
Q: Two endpoints are connected by a single link of rate R- 56kbps and the propagation speed along the…
A: The answer is
Q: What Is Data Sparsity, and How Is It Affecting Data Aggregation?
A: Introduction: The term "data sparsity" refers to the phenomenon of failing to notice enough data in…
Q: 2.Consider relation R=(A,B,C,D) with the following FDs: B → C, C → D, and D → A a. List all…
A: 2. Given, Relation is R = (A, B, C, D) The set of functional dependencies given is : B -> C C…
Q: What is the difference between copying the value 5 into cell 6 and copying the contents of cell 5…
A: Given: Different steps are involved in executing any instruction, such as fetch opcode, memory read,…
Q: Create a program that will provide the SWITCH Condition below. 1: String Concatenation 2: String…
A:
Q: Demonstrate why software security is critical throughout the development process.
A: Introduction: Here we are required to demonstrate why software security is critical throughout the…
Q: There are a number of distinctions when it comes to defending an on-premises data center versus…
A: Intro A company running its own on-premises servers retains more complete control over security. ...…
Q: Short definition of the ff: 1. Internet 2. Client 3. Server 4. NIC 5. LAN 6. MAN 7. WAN 8. Packets…
A: 1. Internet: Internet is a global system that has huge network that interconnects all the…
Q: Describe what you mean by Paging.
A: Introduction: In paging, memory is split into tiny, equal-sized and fixed chunks; these blocks are…
Q: Differentiate the ff: 1. Intranet and Extranet 2. Network Repeaters and Hubs 3. Switch and Routers
A: - We will get upto three questions here. - We need to have the differences.
Q: When creating program logic, what is the advantage of utilizing pseudocode over java code
A: Answer :
Q: Composition and aggregate are two different concepts. What is the difference?
A: The types of associations are aggregation and composition. Aggregation is the relationship between…
Q: By offering examples of each, define the term "maintaining" software and explain how it varies from…
A: Given: Software maintenance is the modification of a software product after shipment to fix bugs,…
Q: discuss testability
A: The capacity to conduct an experiment to evaluate a hypothesis or theory is referred to as…
Q: In terms of throughput speed, wireless networks are faster than wired networks, but they are slower…
A: Wired connection have higher data transmission than Wi-Fi connection. When associated by Ethernet…
Q: [Binary Search Trees] Draw binary search trees with heights of 3, 4, 5, and 6, containing the…
A:
Q: As part of its physical security measures, a company must have firewalls.
A: Introduction: A computer can be secured against unauthorized communications by using a Hardware…
Q: python programming write an if-else statement that compares the age variable with the value 65.…
A: Algorithm to check whether age is greater than 65 or not Take input as age and initialize…
Q: Do you plan to take any action to improve the security of the following URLs (hyperlinks)?
A: Definition: Let's take a look at the solution. External links to websites that may contain phishing,…
Q: Describe how the device manager in the operating system controls the system's efficiency.
A: Introduction: Here we are required to explain how the device manager in the operating system…
Q: Why would the token-ring protocol be inefficient if a LAN had a very large perimeter?
A: The Answer is in step2
Q: Describe the pointer design issues. Most pointers in computer languages can only point to one kind…
A: The answer for the above given question is given below:
Q: How do you tell the difference between bogus and real information on the internet?
A: Internet: The Internet is made up of a system of networks that use telephone lines to link devices…
Q: Every aspect of operating system design must be examined in terms of its contribution to the…
A: Introduction: Every aspect of operating system design must be examined in terms of its contribution…
Q: What is the meaning of the term "wifi access point"? What is the mechanism behind it ?
A: Wi-Fi: Wi-Fi is a wireless network technology that allows you to connect to the Internet. The 2.4GHz…
Q: . Which phase in secure application design and development includes threat modeling? Design…
A: The problem is based on the basics of computer security.
Q: How can I load mysql databases into the command line terminal using a sql query?
A: MySQL databases : MySQL is an open-source relational database management system. It is the second…
Q: Is there anything more you'd want to mention regarding the process of reviewing the software's…
A: Given: Explain the software structure review process with examples
Q: What is the purpose of a firewall, and how does one go up?
A: What is the purpose of a firewall, and how does one go up?
Q: According to their relevance, which of the following aspects of software development are the most…
A: A software developer use computer programming to produce software. They build software by using…
Q: Symbian, Android, and the iPhone all employ the same file deletion mechanism.
A: Given: Android is a mobile operating system built on top of a modified Linux kernel. However, it may…
Q: 1. Write a C# Sharp program to compute the sum of the two given integer values. If the two values…
A: The code is given in the below step
Q: The operating system and other processes are protected from modification by an already running…
A: The right choice is: a the relocation and limit registers are checked for every address created by…
Q: Which network topologies do you believe are viable and which are the most effective?
A: Introduction: A Network Topology is the configuration of computer systems or network devices about…
Q: 1. WHICH OF THE FOLLOWING STATEMENTS ABOUT SGRIBUS IS CORREGT? A. SPECIAL EFFECTS CAN BE APPLED TO…
A:
Q: What distinguishes the von Neumann architecture from its predecessors?
A: Intro The Von Neumann architecture is made up of a single, shared memory for programs and data, a…
Q: A network's topology must be specified in five separate ways. Which of the two do you think is the…
A: Introduction: The physical or logical arrangement of a network is referred to as network topology.…
Q: Please explain the shmat system function to me, including what a shared memory file is, how a…
A: System Function: The C/C++ standard library includes the system() function. It is used to send…
Q: Which PDF to Microsoft Word converter program is the best?
A: Given: Software is a collection of machine instructions. Software is the collective term for all…
Q: Write a string class. To avoid conflicts with other similarly named classes, we will call our…
A: Coding in String :- #include "mystring.h" #include <cctype> #include<iostream>…
Q: Determine the danger associated with each method of authentication and provide a solution for the…
A: Start: Bob hashes the password Alice submits and compares it to a database of hashed passwords. It's…
Q: What are the differences between user-level threads and kernel-level threads?
A: Introduction What are the differences between user-level threads and kernel-level threads?…
Q: What elements led to the success of the IBM PC?
A: Introduction The most important contributions made by IBM were to frame the technology as being…
Q: Are you familiar with interrupt-driven I/O?
A: Interrupt driven I/O is a different type of I/O system. Interrupt I/O is a method…
Q: Computer science What is a prototype, and what is its purpose?
A: Introduction: A prototype is a pre-production sample, model, or release of a product that is used to…
Q: Three aspects contribute to the success and effectiveness of a network: What is an example of this…
A: Given: What are the three characteristics that define a successful and effective network? In your…
Q: guished from
A: IntroductionA technique of data transmission between a central processing unit and a peripheral…
Q: As software engineers, we should ask ourselves this question. How would you suggest improving the…
A: In order to: To list the four most significant traits. Software development has four key…
Q: Expansion cards may be used to improve the computational power of a microcomputer.
A: Microcomputer: An expansion card (also known as an expansion board, adapter card, or accessory card)…
2. (a) Determine whether the array of data {23, 17, 14, 6, 13, 10, 1, 5, 7, 12} is a (min/max) heap or not.
Step by step
Solved in 2 steps with 1 images
- 2.) C [10] = {5, 1,2,8,6,10,3,9,4,7} heap size = 10 Do Heapify (C, 1). What the values in the array C starting from the index 0 to 9?1. Given the unsorted array write the pseudo code so sort it and find a specific element x a. Find (array, x) //first sort the array //search for element x using binary search 2. Given the following stack A = { 29,18,10,15,20,9,5,13,2,4,15} Create a queue by taking the elements from the top of the stack and adding them to a queue 3. what are the worst-case, average-case, and best-case complexities of insertion-sort, merge-sort, and quiksort 4. Given the following array A = {3,13,89,34,21,44,99,56,9} Illustrate the execution of the sorting algorithms on the given array: * Merge-sort algorithm * Quicksort (using the median-of-three pivot) algorithms * Selection Sort algorithm For each fundamental iteration or recursion of the algorithm, write the content of the array. 5. Evaluate the following postfix expression made using a stack: 234*5*-b) Given the following arrays, which ones could represent a max-heap? Choose all that apply. Assume the indices start from 1. {23, 17, 14, 6, 13, 10, 1, 12, 7, 5} {23, 17, 14, 6, 13, 10, 1, 5, 7, 12} . {23, 17, 14, 7, 13, 10, 1, 5, 6, 12} {23, 17, 14, 7, 13, 10, 1, 12, 5, 7}
- 1. Heap and Heapsort. (a) Run Build-Heap on the array [10, 9,4,7,6,2,3,1, 8,5] to construct a min heap. Write down the resulting array. Then, run the loop in Heapsort for three iterations. For each iteration write down the array after Heapify-Down is finished. You do not need to show intermediate steps. (b) Show that the leaves of a heap occupy the positions [],...,n-1 of the array. (c) In the procedure Build-Heap, why do we decrease i from [2]-1 to 0 instead of increasing from 0 to [2]-1? Give an example array where increasing i fails to create a valid min heap.REQUIREMENTS: 1. Using Python, you will write a program called dfs-stack.py that implements Algorithm 2.3 (p. 49): Graph depth-first search (DFS) with a stack. 2. You will not use an adjacency list, as indicated in Algorithm 2.3. Instead, you will use an adjacency matrix (i.e., a two-dimensional array, or, in Python, a list of lists). 3. You may use ANY list method you wish (e.g., append, pop, etc.). IMPLEMENTATION DETAILS: 1. Based upon the REQUIREMENTS above, along with the IMPLEMENTATION DETAILS (i.e., this section), you MUST first develop an algorithmic solution using pseudocode. This includes both your logic (in pseudocode) and the logic presented in the pseudocode indicated in Algorithm 2.3. 2. Be sure to include your name, along with the Certificate of Authenticity, as comments at the very beginning of your Python code. Also, if you collaborated with others, be sure to state their names as well. Your program should begin by prompting the user for the number of vertices, V, in…Question 3 a. "Queues and stacks are used in many real-life situations". In your own words, clearly distinguish between queues and stacks; and give one example of real-life situations in which each of them is used. b. In an array-based implementation of a stack, which end of the contents of the array represent the bottom of the stack and why? c. If the size of circular queue K is 4 with indices number from 0 to 3 what would be the state of the queue after the following set of 8 operations below. Show in a diagram the state of queue K after each of the 8 operations. K. enqueue (“F"), K. enqueue (“R"), K. dequeue(), K. enqueue (“P"), dequeue(), K.front(), K. enqueue (“Z"), K. enqueue (“G") d. Why are insertions and deletions at the logical end of the array more efficient than insertions and deletions in the interior of the array?
- 7. For a given input array, write a code in c or c++ to construct a Max-Heap using the following algorithms.The code should use inherently the same algorithms which were discussed in the class. (a) Build-Max-Heap(b) Max-Heap-Insert4. Assume X = {3,4,6,9,8,7,16,15,20,19} is an array representation of a binary heap, such that each element in X represents a node on the heap. Delete one node from the heap. After the deletion, the root node of the tree representing the heap is node The left child of the root node is node and the right child of the root node is node . The right child of node 8 is node A Que(a) In implementing a Queue using an array, a problem might arise if the Queueis implemented in such a way that items in the Queue are inserted at thenext available location and removed from the next leading position, butsuch that, once deleted, the emptied space is unused. The problem thatarises is one where there is free space still in the array, but it is not usablebecause it is not at the end.Demonstrate this problem with a Queue that is stored in an array of size 5for the following instructions. Next, explain how you might resolve thisproblem.Queue q = new Queue(5); // assume the Queue constructor takes 5 asthe size of the arrayq.enqueue(3);q.enqueue(4);q.enqueue(1);q.dequeue( );q.dequeue( );q.enqueue(6);q.enqueue(5);q.dequeue( ); // at this point,// there are only 2 item2 in the queueq.enqueue(7); // this enqueue cannot occur, why??
- Consider the Stack ADT: Stack: push(x) adds x to top of stack pop() removes top element of stack and returns it size() returns number of elements in stack Select all options that allow for an efficient implementation based on the discussions from class. For any array implementation, you can assume the array is large enough so that making a larger one is not needed when pushing an item to the stack. Using an array with the top at the front of the array. Using an array with the top at the back of the array. Using a singly linked list with the top at the head of the list. Using a singly linked list with the top at the tail of the list. ENGExample function void f() { int array[10]; read(array, 10); reverse(array, 10); print(array, 10); } Stack Frame saved $ra = 4 bytes int array[10] (40 bytes) Figure 7.6: Example of a function f and its corresponding stack frame 5. Suppose we rewrite function f (Figures 7.6) to have an integer parameter n. The local array is now declared to have n integers (rather than 10). This means that the size of the stack frame size of function f will depend on n. Rewrite the function f in MIPS assembly language. Hint: you may use the $fp register (in addition to $sp) to implement the function f. void f(int n) { int array[n]; read(array, n); reverse(array, n); print(array, n); }Problem 1. Suppose you are doing sequential search of the list [15, 18, 2, 19, 18, 0, 8, 14, 19, 14]. Utilizing both a linked list and an array approach to the list, use sequential search and identify how many comparisons would be necessary to find the key '18'?