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
Your company decided to upgrade the older office Ethernet network and needs the fastest speed possible but has decided against f
solmaris [256]

Answer:

10G Ethernet

Explanation:

These are the options for the question;

A) 10BASE Ethernet

B) Gigabit Ethernet

C) Fast Ethernet

D) 10G Ethernet

From the question, we are informed about instance of my company deciding to upgrade the older office Ethernet network and needs the fastest speed possible but has decided against fiber optic cable. In this case my solution for this problem is getting

10G Ethernet. Ethernet can be regarded as traditional technology that connects devices in LAN(wired local area network) as well as WAN(wide area network) which allows them to have communication with each other through a protocol, this protocol is reffered to as common network language, it also be regarded as rules. 10 Gigabit Ethernet which is a technology ofgroup of computer networking that enables transmission of Ethernet frames at high rate of 10 gigabits per second. Therefore, 10G Ethernet is the solution since we need

the fastest possible speed.

5 0
2 years ago
The movie polar express was critically acclaimed due to the unbelievably lifelike movements of Tom Hanks character
Fed [463]
I think it is greyhound
6 0
2 years ago
A Windows user has been successfully saving documents to the file server all morning. However, the latest attempt resulted in th
Natalka [10]

Answer:

c. The share to the file server is disconnected.

Explanation:

Sharing a file to the file server is the same as saving the document to the file server as the most important function of file server is storage. Therefore if one is getting an error message of not being able to find the saved file and to verify the location of '\\FileServer\Docs', it means that the saved files are no longer available anywhere on the server and even in the computer of the user.

8 0
3 years ago
Read 2 more answers
Write a program that use a switch statement whose controlling expression is the variable area code. If the value of area_code is
scZoUnD [109]

Answer:

Table for Area codes are not missing;

See Attachment for area codes and major city I used

This program will be implemented using c++ programming language.

// Comments are used for explanatory purposes

// Program starts here

#include <iostream>

using namespace std;

int main( )

{

// Declare Variable area_code

int area_code;

// Prompt response from user

cout<<Enter your area code: ";

cin<<"area_code;

// Start switch statement

switch (area_code) {

// Major city Albany has 1 area code: 229...

case 229:

cout<<"Albany\n";

break;

// Major city Atlanta has 4 area codes: 404, 470 678 and 770

case 404:

case 470:

case 678:

case 770:

cout<<"Atlanta\n";

break;

//Major city Columbus has 2 area code:706 and 762...

case 706:

case 762:

cout<<"Columbus\n";

break;

//Major city Macon has 1 area code: 478...

case 478:

cout<<"Macon\n";

break;

//Major city Savannah has 1 area code: 912..

case 912:

cout<<"Savannah\n";

break;

default:

cout<<"Area code not recognized\n";

}

return 0;

}

// End of Program

The syntax used for the above program is; om

6 0
3 years ago
The retention of encoded information over time is called storage. A measure of memory storage that involves identifying informat
Anni [7]

Answer: ask google and search quizlet by it , it will show you

Explanation:

7 0
3 years ago
Other questions:
  • Which of the following is a useful policy to minimize waste and mistakes?
    6·1 answer
  • Will an email sent from a phone say it was sent from your phone
    5·2 answers
  • . Given an initially empty stack s that accepts integers, the following operations are performed: s.push (10) s.push (20) s.push
    13·1 answer
  • Write an if statement that assigns 100 to x when y is equal to 0.
    7·1 answer
  • In a ______topology, every device has exactly two neighbors for communication purposes. A failure in any cable or device can tak
    15·2 answers
  • What are horizontal and vertical page break? how and where are these inserted?​
    10·1 answer
  • Simplify 0.2×0.03055 to 3 decimal places​
    15·2 answers
  • Kris is the project manager for a large software company. Which part of project management describes the overall project in deta
    11·2 answers
  • Write a pseudocode algorithm that prompts the user to enter a three-digit number and outputs the hundreds, tens and units.
    6·1 answer
  • A printer is considered to be in the category of
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!