Input data=[1,4,8,11,16,3,1,5] You need to sort given data which are using Insertion and Selection sorting
Q: Given a number and a sorted binary tree, write function that inserts the number into the tree. Given…
A: The code for the above given question is given below:
Q: Consider the following scenario: your firm intends to build a self-contained server room that will…
A: Introduction: In physical security, physical access control systems (PACS) are systems that are used…
Q: Write an essay in which you compare and contrast CPU Scheduling Algorith
A: Introduction: For comparing CPU scheduling techniques, a number of criteria have been proposed. Any…
Q: . Write a function that accepts the address of an integer and returns the sum of numbers from 1 up…
A: Here we will be using call by reference since we are passing address of variable. The function…
Q: To what extent can you use SIMD with data or control-level parallelism? Is there a particular kind…
A: Introduction: In Flynn's taxonomy, single instruction, multiple data (SIMD) is a sort of parallel…
Q: Mousing devices equipped with an optical sensor that detects mouse movement.
A: The optical mouse detects mouse movement with the use of an optical sensor. Optical mouse: - The…
Q: When it comes to embedded systems, watchdog clocks are critical.
A: Introduction: A watchdog timer (WDT) is a crucial component of the simplest type of embedded system.…
Q: .Artificial Intelligence is a branch of Machine Learning. true false
A: This statement is false
Q: What are Boolean basic identities, and how can you use them to reduce Boolean expressions?
A: Introduction: The Boolean fundamental identities are the collection of laws that govern Boolean…
Q: esses know where their data, as well as that of their consu
A: How do these businesses know where their data, as well as that of their consumers, is stored
Q: What are the important things you have learn on this subject. Explain briefly machine learning and…
A: machine learning and DIGITAL AND DATA COMMUNICATION
Q: 1.) What is wrong in the given statement below? fmName.text = 123 Select one: a. text should be…
A: b. 123 should be “123”
Q: Where's the Biggest One? We've already tried comparing 3 numbers to see the largest among a so let's…
A: I give the code in C++ along with output and code screenshot
Q: What does "reduced" imply in the context of a computer with a limited instruction set?
A: INTRODUCTION: Reduced Instruction Set Computer (RISC): This computer's instruction set architecture…
Q: a(2:3,3) * ans =7,11 ans =3,14 O ans =6,10 O error O O O O
A: Answer the above question are as follows:
Q: I'd appreciate it if you could explain the differences between the ARM and core i3 architectures.
A: Between the L1 and L2 cache, the following buffers are required. Between the L1 cache and the L2…
Q: According to the engineering perspective, "life testing" involves determining whether a product will…
A: True
Q: Unix system Explain NFS in detail and how can it be mounted? if any figure, attach it
A: NFS stands for Network File System and it is developed for sharing the files between the Unix…
Q: What resolution do you think a conventional display should have, and why?
A: A monitor is a computer's primary output unit. The resolution and refresh rate of the monitor's…
Q: What data type is needed to store 09:05? Select one: a. Double b. Time c. Single d. Date It…
A: b. Time
Q: What is the significance of software updates? Make sure to talk about security updates, issues,…
A: Introduction: Software: Software is a set of instructions, data, or programs that are used for…
Q: A movie was shot in 150 fps. The movie lasted for 30mins. The movie was played in a vertical and…
A: The answer as given below:
Q: In this variable, the number of statements at the source level as well as the number of I/O…
A: Introduction Input-Output operations are used in computing to communicate between two processing…
Q: 8. Implement the following equations using a single 8x 3 ROM а. АВС + AВС b. ABC + ABC + ABC с. АВС…
A: The answer is as follows.
Q: * The program below creates an array of 10 integers, inserts element and prints the elements in…
A: Complete code: import java.util.*;public class Print { public static void main(String args[]) {…
Q: How does the VA page 30 look if an instruction was rejected? A software-managed TLB would outperform…
A: Introduction: TLB is used to cache page table entries in memory, which is commonly done inside the…
Q: As a result of our findings, we believe Flynn's taxonomy has to be raised by one level. High-level…
A: A high-level computers a PC with an undeniable level computational limit contrasted with a broadly…
Q: Compose a list of two external obstacles to effective listening and two internal obstacles to…
A: External obstacles are- 1. Noisy environment 2. Different mother tongue of both speaker and…
Q: Give two examples of how you can improve cache speed as a programmer.
A: Cache Memory: Cache memory is physical memory. The size of the cache memory is smaller. It is a…
Q: Write the correct statement to store value of “vb programming” to label button 5 Select one: a.…
A: In this question we have to answer the two question. One is the regarding VB programming Second is…
Q: Character devices are usually faster in transmitting data than block devices. Is this statement true…
A: Block devices are basically the storage devices which helps in providing the data operations in a…
Q: Assume register $t0 and $t1 contains 0X020A007E and 0×FFFFFFF0 respectively. The content of $t0…
A:
Q: When a process is suspended, it is withdrawn from contention for an indeterminate period of time on…
A: When processes is suspended, it is removed from the ready queue. But it still exits in the system.…
Q: What object is needed to get data from the end user? Select one: a. textbox b. form c. label It…
A: 1) a textbox 2) d Toolbox 3) d
Q: How may the Bayes Theorem be used to explain image resizer software? Computer science
A: Introduction: The conditional probability of an event depending on the occurrence of another event…
Q: Demonstrate the output of the given program code. int a, t=0, x=1, y=2, z=3; for (a=1;a<4;a++) {…
A: answer is
Q: In what way does the first compound notation differ from the other compound notations?
A: Introduction: A compound is always made up of the same components in the same proportions as its…
Q: Using a suitable diagram, show the sequence of steps in Knowledge Discovery in Databases (KDD)…
A: Diagram:
Q: 1. Add JavaScript to the problem below such that it computes the Average, Letter or both grades…
A: The program is codded in HTML CSS and JS. All files are below:
Q: How many techniques are there for flashing UEFI/BIOS on the motherboard?
A: There are various methods to flash UEFI/BIOS some of them are discussed below: - 1. Download the…
Q: Table size is reduced by deleting columns that meet particular criteria in a relational database.…
A: The select procedure simply searches the table for data and acquires or retrieves entries depending…
Q: In C-language expression, how is not equal to represented? Select one: a. = b. all of the choices C.…
A: Find the answer with reason given as below :
Q: Microcomputers no longer have a floppy drive as a basic feature. What do you believe the next "old"…
A: Introduction: A microcomputer is an electronic device with a central processing unit that is…
Q: Which applications, in your opinion, stand to benefit the most from mistake correction? Wireless…
A: Introduction: The transferring of physical or virtual information or databases to a secondary place…
Q: How are virtual ("horizontal") communications between peer protocols at two distinct entities on a…
A: The information an (N)-entity gets from the (N + l)-entity is transported to the (N)-entity in…
Q: Using directives to reserve 5 data memory locations for array A, and reserve 9 data memory locations…
A: Assembly language directives provide data to the program and control the assembly process. Assembly…
Q: A company has a dedicated link of 100 Mbps. Each employee, when online, transmits continuously at 12…
A: Here we calculate the probability that more than 2 user are transmitting at same time by using the…
Q: Write a Number class that holds a double, and add overloaded operators for +, –, *, /, and…
A: We need to write a program for the mentioned functionalities. The language used is C++.
Q: When it comes to computer architecture, is there a difference between it and computer organisation?…
A: The question is to write the difference between computer architecture and computer organisation.
Q: How much faster is an SSD than a magnetic disc?
A: SSD: The full form of SSD is Solid-State Drive. It is nothing but a huge storage device that holds…
2.
FOR PYTHON
Input data=[1,4,8,11,16,3,1,5]
You need to sort given data which are using Insertion and
Selection sorting. (You have to write only iteration,not code.)
You have to answer the steps in writing.
Step by step
Solved in 3 steps with 2 images
- Given a sequence like [1, 2, 3, 4, 5], and an array of sub sequences like [[1,2], [3, 4], [5]], return true or false if the given sequence could be constructed from given sub sequences. The selected sub sequences would concatenate to construct exactly the given sequence. Please write python function to answer the questionGiven a 2D list of characters and a list of tuples containing replacement pairs, write Pythoncode to replace each character in the list with its replacement. The tuples are of the form (current_char,replacement_char). Print out your list with each row on a new line. For example, given the following listand its replacement pairs: data = [['a','p','p','l','e'], ['b','a','n','a','n','a'], ['c','h','e','r','r','y']] replacements = [('a', 'X'),('b', 'Y'),('c', 'Z')] The output after replacement is: Xpple YXnXnX ZherryNeed help in solving the problem explained in the screenshot in python. Need the time complexity to be a minimum as possible, so using Binary Search would be the best approach. The code def solve(n,k): # solve problem here. Return correct answer n, k = list(map(int,input().rstrip().split(" ")))print(solve(n,k))
- Write a python program that takes two lists, merges the two lists, sorts the resulting list, and then finds the median of the elements in the two lists. [You cannot use python build-in sort() function, you can call your own sort function or copy your code from previous tasks instead] ===================================================== Sample Input 1 list_one = [1, 2, 1, 4] list_two = [5, 4, 1] Sample Output 1 Sorted list = [1, 1, 1, 2, 4, 4, 5] Median = 2 ===================================================== Sample Input 2 list_one = [1, 7, 9, 10] list_two = [2, 7, 6, 5] Sample Output 2 Sorted list = [1, 2, 5, 6, 7, 7, 9, 10] Median = 6.5 #todo#You can use math functions like math.floor to help the calculationimport math def task7(list_in_1, list_in_2):# YOUR CODE HEREreturn median please only use list_in_1, list_in_2 and return median no other function allowed and return median please use only them and no sort function thank you so muchWrite a python program that takes two lists, merges the two lists, sorts the resulting list, and then finds the median of the elements in the two lists. [You cannot use python build-in sort() function, you can call your own sort function or copy your code from previous tasks instead] ===================================================== Sample Input 1 list_one = [1, 2, 1, 4] list_two = [5, 4, 1] Sample Output 1 Sorted list = [1, 1, 1, 2, 4, 4, 5] Median = 2 ===================================================== Sample Input 2 list_one = [1, 7, 9, 10] list_two = [2, 7, 6, 5] Sample Output 2 Sorted list = [1, 2, 5, 6, 7, 7, 9, 10] Median = 6.5 #todo#You can use math functions like math.floor to help the calculation import math def task7(list_in_1, list_in_2): # YOUR CODE HERE return median please use list_in_1, list_in_2 and return median thank you so muchWrite a python program that takes two lists, merges the two lists, sorts the resulting list, and then finds the median of the elements in the two lists. [You cannot use python build-in sort() function, you can call your own sort function or copy your code from previous tasks instead] ===================================================== Sample Input 1 list_one = [1, 2, 1, 4] list_two = [5, 4, 1] Sample Output 1 Sorted list = [1, 1, 1, 2, 4, 4, 5] Median = 2 ===================================================== Sample Input 2 list_one = [1, 7, 9, 10] list_two = [2, 7, 6, 5] Sample Output 2 Sorted list = [1, 2, 5, 6, 7, 7, 9, 10] Median = 6.5 #todo#You can use math functions like math.floor to help the calculationimport math def task7(list_in_1, list_in_2):# YOUR CODE HEREreturn median
- Write a python program that takes two lists, merges thetwo lists, sorts the resulting list, and then finds the median of theelements in the two lists. **<font color='red'>[You cannot use python build-in sort() function, you can call your own sort function or copy your code from previous tasks instead]</font>** ===================================================== **Sample Input 1** list_one = \[1, 2, 1, 4\] list_two = \[5, 4, 1\] **Sample Output 1** Sorted list = \[1, 1, 1, 2, 4, 4, 5\] Median = 2 ===================================================== **Sample Input 2** list_one = \[1, 7, 9, 10\] list_two = \[2, 7, 6, 5\] **Sample Output 2** Sorted list = \[1, 2, 5, 6, 7, 7, 9, 10\] Median = 6.5 this is my code but its not returning median #todo#You can use math functions like math.floor to help the calculation import math def task7(list_in_1, list_in_2): # YOUR CODE HERE list_in_1.extend(list_in_2) sort_list=[] while list_in_1: min=list_in_1[0] for…Write a python program that asks the user to give multiple numbers separated by commas. Your task is to create a dictionary which will have the index of the list as key and summation from start to that index as value. ================================================ Sample Input 1: 3,1,5,4,6,7,8 Sample Output 1: {0: 3, 1: 4, 2: 9, 3: 13, 4: 19, 5: 26, 6: 34} Explanation 1: key 0 → value 3 key 1 → value 3+1 key 2 → value 3+1+5 key 3 → value 3+1+5+4 and so on... ================================================ Sample Input 2: 5,1,3,7,4,8 Sample Output 2: {0:5, 1:6, 2:9, 3:16, 4:20, 5:28} Explanation 2: key 0 → value 5 key 1 → value 5+1 key 2 → value 5+1+3 and so on...Create a Python program using the following: -Create list[ "Parking:ID123", "Speeding:"ID455", "Running:ID346"] -Slice the list by ":" -Create a search such that when the user inputs a name, if the name is on the list, print the name and the corresponding ID number or return that there is no match found. -Use control statements (break/continue)
- Write a C++ program: Ask user to give you a list of the numbers and then Sort them, by calling two functions: Asc(Sort in Ascending order), and Desc(Sort in Descending order): Do it by pointer.Write a program in Java to implement Quick sort algorithm to sort a given set of elements and determine the time required to sort the elements. Repeat the experiment for different values of n, the number of elements in the list to be sorted and plot a graph of the time taken versus n. The elements can be read from keyboard, a file or can be generated using the random number generator.Instead of reading in an entire list N1,N2,⋯N1,N2,⋯ all at once, some algorithms (depending on the task to be done) can read in only one element at a time and process that single element completely before inputting the next one. This can be a useful technique when the list is very big (e.g., billions of elements) and there might not be enough memory in the computer to store it in its entirety. Write an algorithm that reads in a sequence of values v≥0, one at a time, and computes the average of all the numbers. You should stop the computation when you input a value of V = −1. Do not include this negative value in your computations; it is not a piece of data but only a marker to identify the end of the list. Write a java program and please share the code / an example of the code working.