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
just olya [345]
4 years ago
6

Data structures like a binary tree and linked list are built using

Computers and Technology
1 answer:
KiRa [710]4 years ago
8 0

Answer:

D

Explanation:

You might be interested in
Assume the existence of an UNSORTED ARRAY of n characters. You are to trace the CS111Sort algorithm (as described here) to reord
makvit [3.9K]

Answer:

class Main {

  public static void main(String[] args) {

      char arr[] = {'T','E','D','R','W','B','S','V','A'};

      int n = arr.length;

      System.out.println("Selection Sort:");

      System.out.println("Iteration\tArray\tComparisons");

      long comp1 = selectionSort(arr);

      System.out.println("Total comparisons: "+comp1);

      System.out.println("\nInsertion Sort:");

      System.out.println("Iteration\tArray\tComparisons");

      long comp2 = insertionSort(arr);

      System.out.println("Total Comparisons: "+comp2);

      System.out.println("\nOverall Total Comparisons: "+(comp1+comp2));

  }

  static long selectionSort(char arr[]) {

      // applies selection sort for n/2 elements

      // returns number of comparisons

      int n = arr.length;

      long comparisons = 0;

 

      // One by one move boundary of unsorted subarray

      for (int i = n-1; i>=n-n/2; i--) {

              // Find the minimum element in unsorted array

              int max_idx = i;

              for (int j = i-1; j>=0; j--) {

                      // there is a comparison everytime this loop returns

                      comparisons++;

                      if (arr[j] > arr[max_idx])

                              max_idx = j;

              }

              // Swap the found minimum element with the first

              // element

              char temp = arr[max_idx];

              arr[max_idx] = arr[i];

              arr[i] = temp;

              System.out.print(n-1-i+"\t");

              printArray(arr);

              System.out.println("\t"+comparisons);

      }

     

      return comparisons;

  }

  static long insertionSort(char arr[]) {

      // applies insertion sort for n/2 elements

      // returns number of comparisons

      int n = arr.length;

      n = n-n/2;   // sort only the first n/2 elements

      long comparisons = 0;

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

          char key = arr[i];

          int j = i - 1;

          /* Move elements of arr[0..i-1], that are

                  greater than key, to one position ahead

                  of their current position */

          while (j >= 0) {

              // there is a comparison everytime this loop runs

              comparisons++;

              if (arr[j] > key) {

                  arr[j + 1] = arr[j];

              } else {

                  break;

              }

              j--;

          }

          arr[j + 1] = key;

          System.out.print(i-1+"\t");

          printArray(arr);

          System.out.println("\t"+comparisons);

      }

      return comparisons;

  }  

  static void printArray(char arr[]) {

      for (int i=0; i<arr.length; i++)

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

  }

}

Explanation:

Explanation is in the answer.

6 0
3 years ago
Both IT and organizational strategies are static and can be harmed when people resist change because IS success depends on the s
anzhelika [568]
Think it’s true idk
8 0
3 years ago
If the following are using default subnet masks, which one(s) of the following are valid node ip addresses: (select one) a) 220.
Svetach [21]

If the following are using default subnet masks, the option that are valid node ip addresses is option b) 10.10.0.10.

<h3>What does 10. 10 0. 1 mean?</h3>

10.254 and 10.10. 0.1 is known to be a node that are said to be part of the same network.

Note that the  first address of any network is seen as the the "network ID" address of the said network. So, if you are known to be using a kind of 24 networks, one of the real available networks is one that originate from 10.0.

Therefore, If the following are using default subnet masks, the option that are valid node ip addresses is option b) 10.10.0.10.

Learn more about subnet masks from

brainly.com/question/27960959

#SPJ1

5 0
2 years ago
A programming and software development professional would most likely help with
DiKsa [7]
A programming and software development professional would most likely help with
Testing a software program.
3 0
3 years ago
Richard wants to create a cloud-based system that will be a centralized repository of log files from various servers in the orga
jeyben [28]

Answer:

CAD ( d )

Explanation:

Richard should use CAD to create a cloud-based system, since he wants it to be a centralized repository of log files to be taken from the different servers associated with the organization

CAD ; Computer aided design software is the best software to be used because files created using CAD can be easily stored in cloud and it is easily accessible.

4 0
3 years ago
Other questions:
  • What is likely to happen to the economy when there’s too much money or credit circulating?
    13·1 answer
  • What is the correct method to use Dreamweaver to find broken links and orphaned files?
    15·1 answer
  • A device which lets you interact with the computer
    6·2 answers
  • Explain 5 service provided by Internet​
    6·1 answer
  • Consider the classes below:
    13·1 answer
  • The declaration of variables begins with a command a. dim b. rem c. const​
    8·1 answer
  • What is the function of ctrl+f​
    15·2 answers
  • Define ulility software
    8·1 answer
  • Cuantos puntos de habilidad se puede tener en clubes pro?
    9·1 answer
  • how to make windows laptop work faster because I mine is so slowwwww. I already updated it and everything and tried everything b
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!