Answer:
0-9
Explanation:
count 0 as 1
len(0,1,2,3,4,5,6,7,8,9)=10
Suppose you are choosing between the following three algorithms:
• Algorithm A solves problems by dividing them into five subproblems of half the size, recursively solving each subproblem, and then combining the solutions in linear time.
• Algorithm B solves problems of size n by recursively solving two subproblems of size n − 1 and then combining the solutions in constant time.
• Algorithm C solves problems of size n by dividing them into nine sub-problems of size n=3, recursively solving each sub-problem, and then combining the solutions in O(n2) time.
What are the running times of each of these algorithms (in big-O notation), and which would you choose?
Answer:
Algorithm C is chosen
Explanation:
For Algorithm A
T(n) = 5 * T ( n/2 ) + 0(n)
where : a = 5 , b = 2 , ∝ = 1
attached below is the remaining part of the solution
Derive the three-dimensional transformation matrix for scaling an object by a scaling factor s in a direction defined by the direction cosines alpha , beta , gamma
Answer:
i dont know
Explanation:
i dont knoe im doing this for the points hehe
Write a recursive method called permut that accepts two integers n and r as parameters and returns the number of unique permutations of r items from a group of n items. For given values of n and r, this value P(n, r) can be computed as follows:
n!/(n - r)!
For example , permut (7, 4) should return 840.
Answer:
Following are the code to the given question:
public class Main//defining a class Main
{
static int permut(int n, int r)//defining a method permut that holds two variable
{
return fact(n)/fact(n-r);//use return keyword to return calcuate value
}
static int fact(int n)//defining a fact method as recursive to calculate factorials
{
return n==0?1:n*fact(n-1);//calling the method recursively
}
public static void main(String[] abs)//main function
{
//int n=7,r=4;//defining integer variable
System.out.println(permut(7,4));//use print method to call permut method and print its values
}
}
Output:
840
Explanation:
Following is the explanation for the above code.
Defining a class Main.Inside the class two methods, "permut and fact" were defined, in which the "permut" accepts two values for calculating its permutated value, and the fact is used for calculates factorial values recursively. At the last, the main method is declared, which uses the print method to call "permut" and prints its return values.Make these negative sentences more positive and polite. Keep the meaning.
1.Don’t run for the bus. You might slip on the ice and fall
2.Don’t tell me what you can’t do.
3.Don’t eat with your mouth open.
4.Don’t submit an incomplete report.
Answer:
You should not run for the bus. You could slip on the ice and fall
Would you stop telling me what you can't do
Could you not eat with your mouth open
You should not submit an incomplete report
Answer:
You should not run for the bus. You could slip on the ice and fall
please stop telling me what you can't do.
please do not eat with your mouth open
you shouldn't submit an incomplete report. it could affect your grades negatively.
Explanation:
hope this helps!
~mina
To use cache memory main memory are divided into cache lines typically 32 or 64 bytes long.an entire cache line is cached at once what is the advantage of caching an entire line instead of single byte or word at a time?
Answer:
The advantage of caching an entire line in the main memory instead of a single byte or word at a time is to avoid cache pollution from used data
Explanation:
The major advantage of caching an entire line instead of single byte is to reduce the excess cache from used data and also to take advantage of the principle of spatial locality.
Discuss the relationship of culture and trends?
Explain the paging concept and main disadvantages of pipelined
approaches? Compare the superscalar and super pipelined approaches
with block diagram?
Answer:
PAGINACIÓN En la gestión de memoria con intercambio, cuando ... Debido a que es posible separar los módulos, se hace más fácil la modificación de los mismos. ... Ventajas y Desventajas de la segmentación paginada
Explanation:
Question 20:
Which of the following scenarios involve computers making predictions based on the analysis of
patterns in large data sets?
Select two answers.
Astate education board analyzing demographic information and academic records to identify students at risk
of dropping out of school.
The federal government analyzing state spending data to identify which states spent the most on social
services
A video streaming service analyzing viewer's habits to suggest videos based on the viewing history of other
viewers.
An airline analyzing flight records to determine the routes it operates with the least bookings.
Answer:
A video streaming service analyzing viewer’s habits to suggest videos based on the viewing history of other viewers.
A state education board analyzing demographic information and academic records to identify students at risk of dropping out of school.
Explanation:
I just took the test and passed when you have multiple choice questions always pick ones that similar to each other and make sure it fit the question.
Need to compress this IPv6 Address
ad93:a0e4:a9ce:32fc:cba8:15fe:ed90:d768
I can't underatnd your question
SORRY
This lab was designed to teach you more about using Scanner to chop up Strings. Lab Description : Take a group of numbers all on the same line and average the numbers. First, total up all of the numbers. Then, take the total and divide that by the number of numbers. Format the average to three decimal places Sample Data : 9 10 5 20 11 22 33 44 55 66 77 4B 52 29 10D 50 29 D 100 90 95 98 100 97 Files Needed :: Average.java AverageRunner.java Sample Output: 9 10 5 20 average = 11.000 11 22 33 44 55 66 77 average = 44.000 48 52 29 100 50 29 average - 51.333 0 average - 0.000 100 90 95 98 100 97 average - 96.667
Answer:
The program is as follows:
import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
String score;
System.out.print("Scores: ");
score = input.nextLine();
String[] scores_string = score.split(" ");
double total = 0;
for(int i = 0; i<scores_string.length;i++){
total+= Double.parseDouble(scores_string[i]); }
double average = total/scores_string.length;
System.out.format("Average: %.3f", average); }
}
Explanation:
This declares score as string
String score;
This prompts the user for scores
System.out.print("Scores: ");
This gets the input from the user
score = input.nextLine();
This splits the scores into an array
String[] scores_string = score.split(" ");
This initializes total to 0
double total = 0;
This iterates through the scores
for(int i = 0; i<scores_string.length;i++){
This calculates the sum by first converting each entry to double
total+= Double.parseDouble(scores_string[i]); }
The average is calculated here
double average = total/scores_string.length;
This prints the average
System.out.format("Average: %.3f", average); }
}
Animation timing is does not affect the
speed of the presentation
Select one:
True
False
Answer:
True
Explanation:
I think it's true.....
Think of an aspect of HTML that you found challenging to master. Why is that aspect of HTML important? What are some future situations that you could use it in?
Answer:
html is a thing that u can to create an website business that u can make money on it
Time-management techniques work most effectively when performed in which order?
prioritize tasks, reward system, study-time survey, project schedule
project schedule, study-time survey, reward system, prioritize tasks
reward system, prioritize tasks, project schedule, study-time survey
study-time survey, project schedule, prioritize tasks, reward system
Answer:
study-time survey, project schedule, prioritize tasks, reward system.
Explanation:
Time management can be defined as a strategic process which typically involves organizing, planning and controlling the time spent on an activity, so as to effectively and efficiently enhance productivity. Thus, when time is properly managed, it avails us the opportunity to work smartly rather than tediously (hardly) and as such making it possible to achieve quite a lot within a short timeframe. Also, a good time management helps us to deal with work-related pressures and tight schedules through the process of properly allocating the right time to the right activity.
Hence, time-management techniques work most effectively when performed in the following sequential order; study-time survey, project schedule, prioritize tasks, and designing (creating) a reward system.
Answer:
The Answer is:
D. study-time survey, project schedule, prioritize tasks, reward system
Explanation:
got it right on edge
What is the creative strategy for music application.
Answer:
The City of Vancouver has allocated $300,000 to support the growth and development of the Vancouver Music Strategy, developed to address current gaps in the music ecosystem that support: Creating a sustainable, resilient, and vibrant music industry.
Explanation:
there are several application to assist you to surf through the internet mention three regarding computer
Answer:
E-mailweb browsingpeer-to peer servicesWrite the following generic method that sorts an ArrayList of Comparable items. The sort method must use the compareTo method.
public static > void sort(ArrayList list)
Write a test program that:
1. prompts the user to enter 10 integers, invokes this method to sort the numbers, and displays the numbers in ascending order
2. prompts the user to enter 5 strings, invokes this method to sort the strings, and displays the strings in ascending (alphabetical) order
Answer:
Explanation:
The following code is written in Java, it prompts the user to enter 10 integers and saves them to an ArrayList. Then it prompts for 5 strings and saves them to another ArrayList. Then, it calls the sort method and adds the lists as parameters. Finally, it prints out both lists completely sorted in ascending order.
import java.util.ArrayList;
import java.util.Scanner;
class Division{
public static double division(double a, double b) throws Exception {
if(b == 0)
//throw new Exception("Invalid number.");
return (a / b);
return a / b;
}
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
ArrayList<Integer> mylist2 = new ArrayList<>();
for (int x = 0; x < 10; x++) {
System.out.println("Please Enter a Number: ");
int number = in.nextInt();
mylist2.add(number);
}
ArrayList<String> mylist = new ArrayList<>();
for (int x = 0; x < 5; x++) {
System.out.println("Please Enter a Word: ");
String word = in.nextLine();
mylist.add(word);
}
sort(mylist);
sort(mylist2);
for (String x: mylist) {
System.out.print(x + ", ");
}
System.out.println("");
for (int x: mylist2) {
System.out.print(x + ", ");
}
}
public static <E extends Comparable<E>> ArrayList<E> sort(ArrayList<E> list) {
E temp;
if (list.size()>1) // check if the number of orders is larger than 1
{
for (int x=0; x<list.size(); x++) // bubble sort outer loop
{
for (int i=0; i < list.size() - x - 1; i++) {
if (list.get(i).compareTo(list.get(i+1)) > 0)
{
temp = list.get(i);
list.set(i,list.get(i+1) );
list.set(i+1, temp);
}
}
}
}
return list;
}}
What is a font?
O How the text for a paragraph appears
O A display of text characters in a specific style and size
O Text that has been made bold
O Artistic elements you can add to text
Acróstico sobre mouse
In java I need help on this specific code for this lab.
Problem 1:
Create a Class named Array2D with two instance methods:
public double[] rowAvg(int[][] array)
This method will receive a 2D array of integers, and will return a 1D array of doubles containing the average per row of the 2D array argument.
The method will adjust automatically to different sizes of rectangular 2D arrays.
Example: Using the following array for testing:
int [][] testArray =
{
{ 1, 2, 3, 4, 6},
{ 6, 7, 8, 9, 11},
{11, 12, 13, 14, 16}
};
must yield the following results:
Averages per row 1 : 3.20
Averages per row 2 : 8.20
Averages per row 3 : 13.20
While using this other array:
double[][] testArray =
{
{1, 2},
{4, 5},
{7, 8},
{3, 4}
};
must yield the following results:
Averages per row 1 : 1.50
Averages per row 2 : 4.50
Averages per row 3 : 7.50
Averages per row 4 : 3.50
public double[] colAvg(int[][] array)
This method will receive a 2D array of integers, and will return a 1D array of doubles containing the average per column of the 2D array argument.
The method will adjust automatically to different sizes of rectangular 2D arrays.
Example: Using the following array for testing:
int [][] testArray =
{
{ 1, 2, 3, 4, 6},
{ 6, 7, 8, 9, 11},
{11, 12, 13, 14, 16}
};
must yield the following results:
Averages per column 1: 6.00
Averages per column 2: 7.00
Averages per column 3: 8.00
Averages per column 4: 9.00
Averages per column 5: 11.00
While using this other array:
double[][] testArray =
{
{1, 2},
{4, 5},
{7, 8},
{3, 4}
};
must yield the following results:
Averages per column 1: 3.75
Averages per column 2: 4.75
My code is:
public class ArrayDemo2dd
{
public static void main(String[] args)
{
int [][] testArray1 =
{
{1, 2, 3, 4, 6},
{6, 7, 8, 9, 11},
{11, 12, 13, 14, 16}
};
int[][] testArray2 =
{
{1, 2 },
{4, 5},
{7, 8},
{3,4}
};
// The outer loop drives through the array row by row
// testArray1.length has the number of rows or the array
for (int row =0; row < testArray1.length; row++)
{
double sum =0;
// The inner loop uses the same row, then traverses all the columns of that row.
// testArray1[row].length has the number of columns of each row.
for(int col =0 ; col < testArray1[row].length; col++)
{
// An accumulator adds all the elements of each row
sum = sum + testArray1[row][col];
}
//The average per row is calculated dividing the total by the number of columns
System.out.println(sum/testArray1[row].length);
}
} // end of main()
}// end of class
However, it says there's an error... I'm not sure how to exactly do this type of code... So from my understanding do we convert it?
Answer:
Explanation:
The following code is written in Java and creates the two methods as requested each returning the desired double[] array with the averages. Both have been tested as seen in the example below and output the correct output as per the example in the question. they simply need to be added to whatever code you want.
public static double[] rowAvg(int[][] array) {
double result[] = new double[array.length];
for (int x = 0; x < array.length; x++) {
double average = 0;
for (int y = 0; y < array[x].length; y++) {
average += array[x][y];
}
average = average / array[x].length;
result[x] = average;
}
return result;
}
public static double[] colAvg(int[][] array) {
double result[] = new double[array[0].length];
for (int x = 0; x < array[x].length; x++) {
double average = 0;
for (int y = 0; y < array.length; y++) {
average += array[y][x];
}
average = average / array.length;
result[x] = average;
}
return result;
}
Briefly explain how Riboflavin deficiency lead to disease state.
Answer:
Severe riboflavin deficiency can impair the metabolism of other nutrients, especially other B vitamins, through diminished levels of flavin coenzymes [3]. Anemia and cataracts can develop if riboflavin deficiency is severe and prolonged [1]. The earlier changes associated with riboflavin deficiency are easily reversed.