Part 1 1. Write a permutation of 9 integers which is not in sorted order. Sort the integers using the sorting algorithms: Bubble Sort, Insertion Sort, Selection Sort and Quick Sort. Assume that the numbers are stored in an array. You should show the contents of the array after each iteration for all the algorithms. 2. Suppose you are to sort elements which are stored in a very large sorted array followed by a relatively small number of "random" elements. Which of the sequential sorting algorithms from Part 1.1 would be especially suitable for such a task? Justify your choice. 3. What issues are significant when assessing the relative merits of different sorting algorithms? Compare and contrast the sorting algorithms with respect to these criteria.
Q: Q-1 Place the following values on the memory given at right side - A) Write the memory address of Da...
A: According to the guidelines i can answer only 1st que...please ask 2nd que separately :
Q: remediation plan to map vulnerabilities and risks found to appropriate remediation efforts. Provide ...
A: Lets see the solution.
Q: Q6:FIND SUMMATION FOR ODD NEGATIVE AND SUMMATION FOR EVEN NEGATIVE (APPEAR ODD N. & EVEN P. NUMBER I...
A: Lets see the solution.
Q: PC-PT PC-PT PCO PC3 2960-24TT Switcho 2960-24T PC-PT PC-PT PC4 Switch1 PC1 PC-PT PC2 PC-PT PC5
A: According to picture given above For switch to switch : Crossover Ethernet Cable is used. And for ...
Q: C++ Programming: Write a program that implements delimiter matching. Assume that the language only a...
A: logic:- match ascii value 34 for double quotes and 39 for single quotes. Use type casting from cha...
Q: Write the function int count101(int n) that counts the number of occurrences of the bit pattern 101 ...
A: Python is an Object oriented programming, which is interactive and interpreted. It supports many pro...
Q: You are given a collection of N non-empty strings, denoted by S1, S2, .. , Sµ. Then you are given N ...
A: Here I have taken input from the user and then stored the values into the variables. Then, I have cr...
Q: can you tell me the manage mode of adobe?
A: can you tell me the manage mode of adobe?
Q: Suppose you have a polynomial-time algorithm that, given a multigraph H, computes the number of span...
A: Multigraph H. Number of spanning forests of H. Weighted graph G, Number of minimum spanning trees of...
Q: Privacy and data protection in mobile apps are important considerations.
A: Introduction: Privacy and data protection in mobile apps are important considerations.
Q: to solve this problem, I only need the code since I already made the connection of the circuit "It ...
A: the program is an given below :
Q: c# language Open Visual Studio IDE. Create new project and named the project as GreetingApp and the...
A: using System;class GreetingProgram{ static void Main() { /* User Input */ Cons...
Q: What are some of the most important elements that influence DNS policy and how a DNS responds to DNS...
A: answer is
Q: Define a splitstream upgrade, patch, release, and version in terms of system upkeep.
A: Introduction: System maintenance is used to help users and organizations achieve their objectives. ...
Q: What is the level of node 17, and node 11, respectively? Insert integers 11, 22, 15, 44, 6, 9, 3, 3...
A: Basically we know that BST is defined as the Binary Search Tree. This BST concept is mainly handled ...
Q: Write a publie statie method that takes a 2-dim array of floats and returns the t.re the row that ha...
A:
Q: Write code that outputs variable numExams as follows. End with a newline. Ex: If the input is: 3 ...
A: Your python code is given below with an output.
Q: 6. Find the minimized Boolean expression for the function
A: Karnaugh map of the given Boolean table is:
Q: plain why you think ion should return "i
A: The python description is shown as,
Q: Suppose we have the following functions: n log n, n² log n, logn Which order of the functions so tha...
A: - We need to have a correct choice for asymptomatic functions. - The functions :: n log n, n2 log n,...
Q: Using MIPS assembly language, please code the following: Please use if statements in the code -pri...
A: Here is the Code .data inputA: .asciiz "Input value of variable a\n" inputB: .ascii...
Q: 2. Define another characteristic of Data Communication 3. Give an advantage of half duplex over ful...
A: Question 2: Characteristics of Data Communication are: Delivery: Main task of data communication is...
Q: Temperature of the CPU can be checked.
A: Introduction: The central processing unit (CPU) is the fundamental calculating device in computer sc...
Q: Create a mind map with the word Information Technology as the center
A: The figure of mind map is given in second step.
Q: Justify the following statement with the help of a suitable example: “In a class hierarchy of severa...
A: A virtual function is a member function which is declared within a base class and is re-defined or o...
Q: 1- A combinational circuit is defined by the following three functions: F1= XY+XYZ F2= XY + XYZ F3= ...
A: 1- A combinational circuit is defined by the following three functions: F1= 2 + XYZ F2= X? + feYZ F3...
Q: thon plz explain
A: I have written python code below with output:
Q: Construct a 5 to 32-line decoder with four 3 to 8 decoders, with enable and 2 to 4-line decoder
A: A decoder is a composite circuit that converts binary data from n input types to 2 ^ n specific exit...
Q: What argument values are necessary when calling Function 716Ch to read a binary array from a file th...
A: Introduction: This function reads binary data from a file and returns it as data. The format of the...
Q: Write a Java program that takes a string from user which have minimum capacity of 21 and till then u...
A: Answer: Code with Screenshot:
Q: Given a weighted graph as follow:
A: In this question, we are given a graph and have to draw the minimum spanning tree GIVEN: In the bel...
Q: When to use nested classes? Why do we have to use it? In which scenarios should nested classes be us...
A: The main feature of nested classes is that they can access private members of the outer class while ...
Q: For the Grammar {S → AS|a, A → SbA|SS|ba construct Leftmost deriyation for the strin
A: Lets see the solution.
Q: How can I fix the error and complete my code?
A: Problem is in text file there is comma at the end the split method split only split by the string it...
Q: As a forensic investigator, you need to create a process to: Minimize paperwork. Satisfy...
A: Forensic process: The forensic process must preserve the “crime scene” and the evidence in order to ...
Q: What are some concepts/definitions we can learn about combination notation?
A: A combination is a mathematical approach for determining the number of potential arrangements in a s...
Q: C++ programming Question. Try to find the average speed from the velocities of ten particles(in m/s)...
A: C++ code: #include <iostream>using namespace std; int main() { float x = 10, i; float av...
Q: Construct a subprogram that solves the differential equation set dy = g(y,t)dt %3D dt with the fourt...
A: In This Problem : The task is to find value of unknown function y at a given point x.The Runge-Kutta...
Q: Develop a java program to print a receipt for the tuition fee payment. Define a class TuitionFee wit...
A: I give the code in Java along with output and code screenshot
Q: C++ programming Question. Try to find the most probable speed from the velocities of ten particles(i...
A: Input : Velocities of ten particles in m/s Output : Most probable speed Programming Language : C++ W...
Q: When it comes to information systems (IS), what exactly are the duties of the technology office of a...
A: Please refer below image for duties of technology office of a company's IS department:
Q: Write a Java program to calculate the RMS velocity of oxygen molecule at 27deg C.
A: public class Main{ public static void main(String[] args) { /* RMS velocity = √3RT/M ...
Q: 2) Build your portfolio applying HTML and CSS and submit both of the files.
A: The required portfolio website files are provided in the next step.
Q: How many Matlab seat licenses are required for there to be a ~1% steady state probability
A: The answer is
Q: collect a head before any eyes, mouth or horn can be added. ode, it is worth playing this game a few...
A: Q1: import random PARTS = {1: 'body', 2: 'tail', 3: 'leg', 4: 'head', 5: 'eye', 6: 'mouth', 7: '...
Q: Write a Java program to calculate the RMS velocity of oxygen molecule at 27deg C.
A: Required:- Write a Java program to calculate the RMS velocity of an oxygen molecule at 27deg C. Appr...
Q: Assume you wish to use WebGL to create a software that draws two types of objects: sparkly billiard ...
A: Introduction: WebGL is a graphical application programming interface (API) that was developed specif...
Q: Before 350 companies are awarded ISO 9002, few officers are assigned to check all the items manufact...
A: Given The answer is given below.
Q: Physicians must follow HAPAA regulations when they send data to the cloud, and the penalties for not...
A: Introduction: An Internet service provider (ISP) organizes and administers data storage under a clou...
Q: Look for 5 IoT Applications. Provide an image including a short description for each. Please provide...
A: Given: Look for the following 5 Internet of Things (IoT) applications. For each, provide an image an...
Step by step
Solved in 5 steps with 4 images
- Finding the common members of two dynamic arrays: Write a program that first reads two arrays and then finds their common members (intersection). The program should first read an integer for the size of the array and then should create the two arrays dynamically (using new) and should read the numbers into array1 and array2 and then should find the common members and show it. Note: The list of the common members should be unique. That is no member should be listed more than once. Tip: A simple for loop is needed on one of the arrays (like array1) and one inner for loop for on array2. Then for each member of array1, if we find any matching member in array2, we record it. Sample run: Enter the number of elements of array 1: 7 Enter the elements of array 1: 10 12 13 10 14 15 12 Enter the number of elements of array 2: 5 Enter the elements of array 2: 17 12 10 19 12 The common members of array1 and array2 are: 12 10struct grade { char id[10]; int mark; }; Using the student structure given above, create an array of size 5 students. Then write a complete C program to sort the students array based on the students rank. Use the following sorting techniques in your code. Don’t forget to print initial array and final (sorted) array. a. Insertion sort b. Merge sort c. Quick sortAssignment Write a program that reads a 2D array of chars, checks, and corrects each char within this array, and print out the corrected 2D array. First the program will read the row count (rowCount) and column count (columnCount) of the 2D array, both as int values. Then, the chars constituting the 2D array will be read on a row-by-row basis. After reading the 2D array, the program will check and correct each char within the 2D array according to the rules below. This process MUST be done by using a void function by sending the appropriate cell of the 2D array with a call-by-reference fashion. • If the row index is an even number, a char can only be a lowercase English value. • If the row index is an odd number, a char can only be ?, 7', or X'. • Any incorrect value MUST be changed into Finally, the checked and corrected 2D array will be printed out to the screen. NOTE: Checking the correctness of a char and correcting it (if necessary) MUST be done in the function with a…
- Programming Language: C Programming Write a program of sorting an array. Declare single dimensional array and accept 5 integer values from the user. Then sort the input in ascending order and display output. Write a program in C to input size of an array, input and store elements in an array and allow to delete particular elementAnswer in C++ Programming Language. C++, Array Write a program that will ask the user to enter a set of numbers and outputs all the subsets of that set. The size of the array is 5. Ask the user if he wants to repeat the program by pressing y/Y.weight You are given 4 items as {value, weightpairs in this format {{20,5}, {60, 20}, {25, 10}, {X, 25}}You can assume that the array is sorted based on the value ratio. The capacity of knapsack is 50. The item no. 4 (whose weightis 25 ) is taken fractionally to fill upto the knapsack capacity. That fraction is represented informat. What is the lowest possible value of 6? For the question above, assume the total value stored in the knapsack is 135 after you have filled upto the knapsack capacity. What is the value of X(in other words, the value of the item no. 4) ? Give your answer to at least two decimal places.
- True or False. A simple variable, also called a scalar variable, is one that is unrelated to any other variable in the computer’s internal memory. The bubble sort algorithm gets its name from the fact that as the larger values drop to the bottom of the array, the smaller values rise, like bubbles, to the top. Programmers use arrays to temporarily store related data in the internal memory of the computer. Different variables in the same array may have different data types. The elements in an array can be used just like any other variables. When an array is sorted in ascending order, the first element contains the largest value and the last element contains the smallest value. When passing an array by reference in C++, you do not include the address-of operator before the formal parameter’s name in the function header. You distinguish one variable in a one-dimensional array from another variable in the same array using a unique integer,…True or False For each statement below, indicate whether you think it is True or False If you have an array with no “holes”, the append function performs at O(1) Inserting an element at the front and shifting all elements performs significantly worse than appending an element at the end of the list For the insert function, if the array is empty, there are no comparison operations that need to be performed and you can immediately add the new element Binary search can be used on an unsorted array to significantly improve its performance from O(n) to O(1) Because the update algorithm depends on using linear search, its performance is O(1) in the worst case scenario True If you search for and delete an element in an unsorted array and then shift the rest of the elements to fill the hole, the worst case performance is O(n) If you search for and delete an element in an unsorted array and then move the last element to fill the hole, the worst case performance is O(n)True or False For each statement below, indicate whether you think it is True or False If you have an array with no “holes”, the append function performs at O(1) Inserting an element at the front and shifting all elements performs significantly worse than appending an element at the end of the list For the insert function, if the array is empty, there are no comparison operations that need to be performed and you can immediately add the new element Binary search can be used on an unsorted array to significantly improve its performance from O(n) to O(1)
- Task 05: An r-combination of elements of a set is an unordered selection of r elements from the set. Thus, an r-combination is simply a subset of the set with r elements. Given an array of size n, generate and print all possible combinations of r elements in array. hint, if input array is (1, 2, 3, 4} and r is 3, then output should be: 123 124 134 2341. Sorting• Begin by filling an array with random numbers:import numpy as npnp.random.seed(1012)DATASIZE = 1000MAX_VALUE = 10000000data = np.random.randint(0, MAX_VALUE, size=DATASIZE)• Write a function that is passed a numpy array. The function should walkthrough the array element-by-element, comparing the current element tothe next element. Swap if the next is smaller than the current – sortingthese two elements.• Write a second function that calls the above function n times, where n isthe number of elements (size) of the array. Pass the same numpy arrayeach time. 2. Bubble Sort• The sort from part 1 can be improved. If the data passed to be sorted isalready sorted, it still performs all of the work, as if the array was notsorted.Make two improvements:• Change the first function (the one that does the comparisons), so that it returns aboolean that states whether the array is sorted. Make use of that boolean to stopcalling the first function if the array is sorted.• Consider…1. Sorting• Begin by filling an array with random numbers:import numpy as npnp.random.seed(1012)DATASIZE = 1000MAX_VALUE = 10000000data = np.random.randint(0, MAX_VALUE, size=DATASIZE)• Write a function that is passed a numpy array. The function should walkthrough the array element-by-element, comparing the current element tothe next element. Swap if the next is smaller than the current – sortingthese two elements.• Write a second function that calls the above function n times, where n isthe number of elements (size) of the array. Pass the same numpy arrayeach time.