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
Question 1 of 5
saveliy_v [14]
B) each person gets to contribute in their own unique way
8 0
2 years ago
Read 2 more answers
Select the correct answer from each drop-down menu.
tia_tia [17]

Answer:

<dd> tag is used

Explanation:

The <dd> tag is used in HTML document to explain set of terms. The <dd> tag list is used in conjunction with the <dl> term. Inside a <dd> tag we can insert text, sentence, paragraph or links. There are 4 primary tags to build any website. Every HTML document begins and ends with HTML tag.

6 0
2 years ago
Quick question how the internet has impacted y’all life ? 5 sentences or more
Alexeev081 [22]

Answer:

I grew up in the early internet stages. when i was young we would always have to sit at school, meetup somewhere, in town, or use the home phone. But when the internet was invented we could talk to each other through our computers at home. Old computers were so bulky and slow, but that was the coolest thing around. Now i can sit at home with my 20'' moniter on my 5g wifi and talking to my friends like theres no tomorrow. The internet has changed so much in the last years. If you were gonna tell me that one day ill be sitting at home playing games online and working from home on a laptop i would have told you that you were crazy.

Explanation:

6 0
2 years ago
Read 2 more answers
What is a specific challenge faced by information visualization researchers who are building an interface?
Mkey [24]

Answer:

 Information virtualization is the process of representing the abstract data such as numeral number and text into the form of visual which is human can easily understand.

The main challenges faced by the information visualization researchers are:

  • The main challenge which are faced by the information virtualization is during the data importing and also cleaning in the system.
  • It also not able to access the large amount of the data easily from the system.
  • Due to the poor selection of the scale and the coordinate rotation it also lead to the data distortion.
3 0
3 years ago
When trying to remember a list of words, a person may choose a word to which they "hang" their memories on. This type of mnemoni
nika2105 [10]

Answer:

Peg

Explanation:

This is known as the "peg technique." The name comes from the fact that we usually employ pegs to hang clothes to dry. In this memory aid, the person who wants to memorize something creates mental associations between two concrete objects. This is done in a one-to-one fashion that links all the words together.

6 0
3 years ago
Other questions:
  • If you are trying to create a web page for your band and having difficulty creating links to other groups on your page, what is
    7·1 answer
  • What does the use of color and images on a blog refer to?
    10·2 answers
  • What is an example of constructive criticism for an employee who is shy during meetings?
    15·2 answers
  • Because log-on procedures may be cumbersome and tedious, users often store log-on sequences in their personal computers and invo
    6·1 answer
  • As an administrator for the Contoso Corporation, your primary office is in Sacramento and your data recovery site in Las Vegas.
    15·1 answer
  • You start up your laptop while getting a coffee across the room. You hear the usual chimes and doinks as it starts up. When you
    14·2 answers
  • You should process the tokens by taking the first letter of every fifth word,starting with the first word in the file. Convert t
    12·1 answer
  • ICS facilitates the ability to communicate by using:
    7·1 answer
  • Which type of cloud computing offers easily accessible software and applications on the machines?
    7·1 answer
  • What are the four stages a customer goes through when buying a product?
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!