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
ANTONII [103]
3 years 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:
Lilit [14]3 years ago
4 0

The below code will help you to solve the given problem and you can execute and cross verify with 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
Secops focuses on integrating the need for the development team to provide iterative and rapid improvement to system functionali
ratelena [41]

Answer:

A. True.

Explanation:

Secops or security- operation is a mechanism that focus on merging and collaborating the security team and the development operation team. It is made to prevent, sacrificing one for the other like the security of an application for the functionality and development of the application.

It tries to create communication between both teams, for every decision made to equally and positively affect both teams operation and result.

6 0
3 years ago
________ are devices used to send data between two networks.
svetoff [14.1K]
The answer is routers
4 0
3 years ago
Pleas help 99 points and get brainliest
sleet_krkn [62]
AutoSum is a feature in Microsoft Excel which involves you as the user being able to input some sort of formula and for it to apply to all selected cells. It works in many different ways. For example, it has the ability to auto fill so that it fills the cells with numbers from 1-100. Or days of the week, or months of the year. If you were creating a Gantt chart for project management, you would want to auto fill the consecutive days of which you want the project to run for. 


8 0
3 years ago
Read 2 more answers
What are the network topologies? Advantages and disadvantages.
s344n2d4d5 [400]
Network topology is the arrangement of the elements of a communication network. Network topology can be used to define or describe the arrangement of various types of telecommunication networks, including command and control radio networks, industrial fieldbusses and computer networks.

Advantages:

It is easy to handle and implement.

It is best suited for small networks.

Disadvantages:

The cable length is limited. This limits the number of stations that can be connected.

This network topology can perform well only for a limited number of nodes.
6 0
3 years ago
Three variables, x, y and z, supposedly hold strings of digits, suitable for converting to integers. Write code that converts th
Gelneren [198K]
The answer is 45boobg
3 0
3 years ago
Read 2 more answers
Other questions:
  • Your Economics teacher has asked you to create a chart showing how supply and demand affects the price of gasoline. Which applic
    13·2 answers
  • A company has developed a business-critical system for its core automation process with a software vendor. Which of the followin
    12·1 answer
  • Given the scenario, before leaving the office, you ask the CIO to provide which formal document authorizing you to perform certa
    11·1 answer
  • How many times would the following loop iterate?
    15·1 answer
  • List three features of the third generation of computers
    13·1 answer
  • Can somebody PLEASE help me cancel my subscription I have tried so many different things and contacted support - they are no hel
    14·1 answer
  • What is the maximum number of extended partitions can you have on a hard drive?
    14·1 answer
  • You use a Windows desktop system to edit and produce audio files. Your system has two hard disks installed. Your applications ar
    10·1 answer
  • What is Frederick Taylor attributed to doing
    15·1 answer
  • Consider the following code using the posix pthreads api:
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!