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
In cell B13, create a formula without a function using absolute references that subtracts the values of cells B5 and
chubhunter [2.5K]

Answer:

The formula in Excel is:

=($B$6 - $B$5 - $B$7)* $B$8

Explanation:

Required

Use of absolute reference

To reference a cell using absolute reference, we have to include that $ sign. i.e. cell B5 will be written as: $B$5; B6 as $B$6; B7 as $B$7; and B8 as $B$8;

Having explained that, the formula in cell B13 is:

=($B$6 - $B$5 - $B$7)* $B$8

8 0
2 years ago
Choose the word that best completes this sentence. ____________ should cover every part of the worksite.
Evgen [1.6K]
Since you provide no choices, here are several things that should cover every part of the worksite :
- Emergency exit
- Safety measures

Hope this helps
5 0
3 years ago
Read 2 more answers
Can someone please help me write a code for this
Anon25 [30]
When in doubt, decompose (break into smaller parts) the problem!

You need to display a GUI.
You need to accept input from two widgets and convert it integers.
You need to add a range of numbers.
You need to concatenate a string of what you're doing with the addition.
You need to display an answer in a widget and maybe redraw the window.

I've been having success copying the assignment into my source file and decomposing it as comments to frame out my program.
5 0
3 years ago
Write a program to find area of rectangle​
cricket20 [7]

Answer:

program by INPUT statement

Explanation:

CLS

REM to find the area of rectangle

INPUT L

INPUT B

LET AOR = L * B

LET " AOR = "; AOR

END                

                                                                                                     Press F5

3 0
2 years ago
In 1972, earlier designers built the
Sonbull [250]

The exercise is about filling in the gaps and is related to the History of the ARPANET.

<h3>What is the History of the ARPANET?</h3>

From the text:

In 1972, earlier designers built the <u>ARPANET </u>connecting major universities. They broke communication into smaller chunks, or <u>packets </u>and sent them on a first-come, first-serve basis. The limit to the number of bytes of data that can be moved is called line capacity, or <u>bandwidth</u>.

When a network is met its capacity the user experiences <u>unwanted pauses</u>. When the network is "slowing down", what is happening is users are waiting for their packet to leave the <u>queue</u>.

To make the queues smaller, developers created <u>mixed </u>packets to move <u>simultaneously</u>.

Learn more about the ARPANET at:
brainly.com/question/16433876

7 0
2 years ago
Other questions:
  • You can click a web page title on the _____ list to return to that page.
    10·1 answer
  • The component in a disk brake unit acts as a return spring and allows the pad to move a ay from the rotor is the
    6·1 answer
  • A security policy is a
    11·1 answer
  • Which statement is used to create a file object that will append data to an existing file? BufferedWriter salesdata =
    7·2 answers
  • An interface does not have ____.
    13·1 answer
  • Which functions are examples of logical test arguments used in formulas? Check all that apply. OR IF SUM COUNT NOT AND
    12·2 answers
  • State True or False: 1. Application software can run without the presence of system software. 2. . A language processor translat
    14·1 answer
  • HELP ME?!!?!?!?!?!?
    9·2 answers
  • What is the two’s compliment of -95,-122,-111,-57
    9·1 answer
  • How to clear a function in functional component react.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!