answer.
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
Alexxx
11 days ago
5

c++ You are given an array A representing heights of students. All the students are asked to stand in rows. The students arrive

by one, sequentially (as their heights appear in A). For the i-th student, if there is a row in which all the students are taller than A[i], the student will stand in one of such rows. If there is no such row, the student will create a new row. Your task is to find the minimum number of rows created.
Computers and Technology
1 answer:
maria [879]11 days ago
4 0

The following code will assist you in solving the specified problem; you can run it and verify against some sample input and output.

#include<stdio.h>

#include<string.h>

 int* uniqueValue(int input1,int input2[])

 {

   int left, current;

   static int arr[4] = {0};

   int i      = 0;

     for(i=0;i<input1;i++)

      {

         current = input2[i];

         left    = 0;

         if(current > 0)

         left    = arr[(current-1)];

      if(left == 0 && arr[current] == 0)

       {

       arr[current] = input1-current;

       }

       else

   {

       for(int j=(i+1);j<input1;j++)

       {

           if(arr[j] == 0)

           {

               left = arr[(j-1)];

               arr[j] = left - 1;

           }

       }

   }

}

return arr;

}

You might be interested in
Which is among the earliest formats of audio used in video games? A. MP3 B. wave table synthesis C. pulse code modulation D. MOD
Harlamova29_29 [932]

Answer:

MOD

Explanation:

The MOD audio file format is primarily designed to represent musical content. It employs the.MOD file extension and is notably recognized as background music in various independent video games. It can be said that MOD audio file types are among the most widely used trackers in numerous computer games and demos.

0 0
1 month ago
Read 2 more answers
A video conferencing application isn't working due to a Domain Name System (DNS) port error. Which record requires modification
Rzqust [894]

Answer:

Service record (SRV)

Explanation:

Service records, known as SRV records, contain information defining aspects of the DNS like port numbers, server details, hostnames, priority, weight, and the IP addresses of designated service servers.

The SRV record serves as a valuable reference for locating specific services, as applications needing those services will search for the corresponding SRV record.

When configured, the SRV provides the necessary ports and personal settings for a new email client; without this, the parameters within the email client will be incorrect.

8 0
1 month ago
A user calls the help desk and reports that the workstation, when powering up, displays error messages about an invalid system d
ivann1987 [930]

Answer:

Option (A) is the correct choice.

Explanation:

The situation describes an invalid boot disk error occurring during startup, indicating that the system fails to recognize the hard disk necessary for booting.

MBR / GPT is the partition layout that holds the essential code for system startup. Occasionally, the partition files that contain this code may become corrupt, causing an invalid boot disk error during the boot process.

Therefore, the most fitting answer is option (A).

The remaining choices are incorrect for these reasons:

  • If the boot system malfunctions, it cannot produce an invalid boot disk error.
  • If the files of the operating system are corrupted, the error will pertain to missing files.
  • A device driver cannot influence the system's booting process.
5 0
1 month ago
Assume that a function named swapdoubles has been defined and is available for use in this exercise: that function receives two
Natasha_Volkova [897]
The provided C++ code is designed to sort three double variables: void sort3(double &a, double &b, double &c). The logic within functions attempts to ensure that these values are ordered correctly, implementing swaps accordingly.
6 0
18 days ago
An aviation tracking system maintains flight records for equipment and personnel. The system is a critical command and control s
Harlamova29_29 [932]

Answer:

offline backup solution

Explanation:

In this context, the ideal choice would be an offline backup solution. Essentially, this consists of a local, non-internet connected server that retains all the flight record information that is part of the cloud system. This backup server would receive updates regularly to ensure the data is current. The aviation firm would own these servers, which would serve as a fallback option should the cloud platform experience downtime or if access to the cloud service is hindered. Being offline enables the company to retrieve the database independent of internet issues.

5 0
1 month ago
Other questions:
  • java methods Write a program whose input is a character and a string, and whose output indicates the number of times the charact
    10·1 answer
  • How to code 2.9.5: Four colored triangles {Code HS}
    10·1 answer
  • When performing actions between your computer and one that is infected with a virus which of the following offers no risk becomi
    5·1 answer
  • You are a police officer trying to crack a case. You want to check whether an important file is in the evidence room. Files have
    5·2 answers
  • How has the development of personal computer hardware and software reversed some of the trends brought on by the industrial revo
    15·1 answer
  • Xem tập các tiến trình sau đây, với thời gian cần chạy ở cột Burst Time được cho ở đơn vị mili giây.
    10·1 answer
  • In a survey of 7200 T.V. viewers, 40% said they watch network news programs. Find the margin of error for this survey if we want
    6·1 answer
  • Danielle, a help desk technician, receives a call from a client. In a panic, he explains that he was using the Internet to resea
    9·1 answer
  • Suppose that a 10-Mbps wireless station is transmitting 50-byte frames one immediately after the other.
    6·2 answers
  • When long labels are required, which of these commands can you use to improve readability of a worksheet?
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!