1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Ratling [72]
3 years ago
11

What makes for a good algorithm compatibility complexity humor correctness efficiency?

Computers and Technology
1 answer:
Svetlanka [38]3 years ago
5 0
Correctness is key. The other ones are optimizations at most. Although I would always include humor... ;-)
You might be interested in
Which category best represents: a student sends harassing emails to another student. The receiving student retaliates with a "fl
Dima020 [189]
It is considered C. cyber bullying
3 0
3 years ago
Read 2 more answers
With whom does the success of information processing in the firm lie with?
Leno4ka [110]

Answer:

depends

Explanation:

it lies with the entire firm and its ability to utilize or process the information in the most efficient way.

3 0
2 years ago
Read 2 more answers
In which state of matter is there no particle motion?
kiruha [24]
Solid is your answer for the day
6 0
2 years ago
The ____ of a variable is the location in memory where it’s value is stored. A. Value B. Address C. Data type D. Number
fomenos

Answer: C. Data type

Explanation:

data types are defined as the data storage format that a variable can store a data to perform a specific operation. Data types are used to define a variable before its use in a program. Size of variable, constant and array are determined by data types.

3 0
3 years ago
1. The following programs require using arrays. For each, the input comes from standard input and consists of N real numbers bet
Mamont248 [21]

Answer:

import java.util.*;

import java.io.BufferedReader;

import java.io.IOException;

import java.io.InputStreamReader;

import java.util.Arrays;

class GFG

{

  // Function for calculating mean

  public static double findMean(double a[], int n)

  {

      int sum = 0;

      for (int i = 0; i < n; i++)

          sum += a[i];

 

      return (double)sum / (double)n;

  }

  // Function for calculating median

  public static double findMedian(double a[], int n)

  {

      // First we sort the array

      Arrays.sort(a);

      // check for even case

      if (n % 2 != 0)

      return (double)a[n / 2];

 

      return (double)(a[(n - 1) / 2] + a[n / 2]) / 2.0;

  }

  public static double findMode(double a[], int n)

{

// The output array b[] will

// have sorted array

//int []b = new int[n];

 

// variable to store max of

// input array which will

// to have size of count array

double max = Arrays.stream(a).max().getAsDouble();

 

// auxiliary(count) array to

// store count. Initialize

// count array as 0. Size

// of count array will be

// equal to (max + 1).

double t = max + 1;

double[] count = new double[(int)t];

for (int i = 0; i < t; i++)

{

count[i] = 0;

}

 

// Store count of each element

// of input array

for (int i = 0; i < n; i++)

{

count[(int)(10*a[i])]++;

}

 

// mode is the index with maximum count

double mode = 0;

double k = count[0];

for (int i = 1; i < t; i++)

{

if (count[i] > k)

{

k = count[i];

mode = i;

}

}

return mode;

}

public static double findSmallest(double [] A, int total){

Arrays.sort(A);

return A[0];

}

 

public static void printAboveAvg(double arr[], int n)

{

 

// Find average

double avg = 0;

for (int i = 0; i < n; i++)

avg += arr[i];

avg = avg / n;

 

// Print elements greater than average

for (int i = 0; i < n; i++)

if (arr[i] > avg)

System.out.print(arr[i] + " ");

System.out.println();

}

 

public static void printrand(double [] A, int n){

Arrays.sort(A);

for(int i=0;i<n;i++){

System.out.print(A[0]+"/t");

}

System.out.println();

}

 

public static void printHist(double [] arr, int n) {

 

for (double i = 1.0; i >= 0; i-=0.1) {

System.out.print(i+" | ");

for (int j = 0; j < n; j++) {

 

// if array of element is greater

// then array it print x

if (arr[j] >= i)

System.out.print("x");

 

// else print blank spaces

else

System.out.print(" ");

}

System.out.println();

}

// print last line denoted by ----

for(int l = 0; l < (n + 3); l++){    

System.out.print("---");

}

 

System.out.println();

System.out.print(" ");

 

for (int k = 0; k < n; k++) {

System.out.print(arr[k]+" ");

}

}

  // Driver program

  public static void main(String args[]) throws IOException

  {

      //Enter data using BufferReader

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

double [] A = new double[100];

int i=0;

System.out.println("Enter the numbers(0.0-1.0) /n Enter 9 if u have entered the numbers. /n");

do

{

A[i++]=Double.parseDouble(br.readLine());

}while(A[i-1]==9);

      i--;

      System.out.println("Average = " + findMean(A,i) );

      System.out.println("Median = " + findMedian(A,i));

      System.out.println("Element that occured most frequently = " + findMode(A,i));

      System.out.println("number closest to 0.0 =" + findSmallest(A,i));

      System.out.println("Numbers that are greater than the average are follows:");

      printAboveAvg(A,i);

      System.out.println("Numbers in random order are as follows:");

      printrand(A,i);

      System.out.println("Histogram is bellow:");

      printHist(A,i);

  }

}

Explanation:

3 0
3 years ago
Other questions:
  • In the Happy Valley School System, children are classified by age as follows: less than 2, ineligible 2, toddler 3-5, early chil
    6·1 answer
  • Consider the cement used for the foundation; the bricks and timber used for the walls; and the shingles used for the roof. All o
    5·1 answer
  • Why is it a good idea to view your HTML code in more than one web browser
    13·1 answer
  • How do you know when a spreadsheet object is active in a powerpoint presentation?
    11·1 answer
  • A two-dimensional array can be viewed as ___________ and _____________.
    10·1 answer
  • A workstation with a static IP (Internet Protocol) address can print and authenticate to a server, but cannot browse to www.comp
    14·1 answer
  • Always follow the routine "clean up while in use and clean up before keeping it".
    6·1 answer
  • Which of the following is an advantage of using variables?
    9·1 answer
  • Which of the following best describes a balanced reaction
    11·1 answer
  • a functional policy declares an organization's management direction for security in such specific functional areas as email, rem
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!