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
Vanyuwa [196]
3 years ago
7

How do you do this question?

Computers and Technology
1 answer:
elena55 [62]3 years ago
4 0

Answer:

for (scores.Entry<String, Integer> entry : scores.entrySet()) {

          int value=0; String key="Rambo";

          String k = entry.getKey();

           int v = entry.getValue();

           if (v>value)

           {

               value =v;

           }

           else

           {

               value=value;

           }  

       }

       for( scores.Entry<String, Integer> entry : scores.entrySet())

      {

        if( entry.getValue()==value)            

        System.out.println("Key = " + entry.getKey() + ", Value = " + entry.getValue());

      }

Explanation:

The above scores are an object of Map type.  And this is a parameter of findUopStudent function. So scores is a Map, and entry is an item. And we get its key and value. Now we compare each value using senteniel method and find the maximum value. Now we iterate through the scores using for the look and check the value of each entry against the maximum value found, and we print out the entry with maximum value. And that is the top student, which is required.  

You might be interested in
Consider a sequence of 1's and 1's with the property that the sum of any prefix of the sequence is never negative For example th
MrMuchimi

Answer:

Check the explanation

Explanation:

Answer: Solution: Algorithm:

Step 1: Start.

Step 2: Create a stack Step

3: Push an initial stack variable, it will represent that, stack is empty.

Step 4: Get input

             If +1 then push "+1"

             Else if -1 then pop

Step 5: Repeat until all input finish or Stop if empty stack variable popped. Step 6: Stop.

It is a pushdown automata problem.

It can be also represented as:

X =1+1* —1* 1No(+1)>= No(-1)}

4 0
3 years ago
Which of the following types of servers can be used to cache requested Internet resources so that they can be more quickly deliv
Nitella [24]

Answer:

Option d): Proxy Server  is the correct answer.

Explanation:

Proxy Server can be used to cache requested Internet resources so that they can be more quickly delivered to users requesting the same resource while at the same time reducing the burden on the external network connection to the Internet for an organization.

<u>Working of Proxy Server:</u>

These servers work by saving all the files into the servers that are uploaded by other persons once. After that whenever someone needs the same file, it is provided by the proxy server itself rather than the actual stored location of the file. Thus it somehow speeds up the delivery process.

<h2>I hope it will help you!</h2>
7 0
3 years ago
What does ADF Means?<br><br> What does CLO Means?
Elenna [48]
ADF means 'automatic document feeder'

CLO means 'collateralized loan obligation'
3 0
4 years ago
An example for Shareware?
Kryger [21]
A software that is free of cost for a certain amount of time such as Adobe programs, or Winzip.
6 0
2 years ago
Read 2 more answers
Assume courseTitle ="Principles in Information Technology and Computation";
deff fn [24]

Answer:

It saves the position of the first occurrence of "o" to variable something.

Explanation:

The search() method in javascript searches the expression or the string and returns the position of it's first occurrence and if not found it returns -1.

So in the code given above it will search for character o and returns the position of it's first occurrence that is 16 and if there were no o in the string then it would have returned -1.

3 0
4 years ago
Other questions:
  • A network TAP serves what purpose on a network?
    7·1 answer
  • A man travel 200m towards east&lt;br /&gt;from his house then takes left&lt;br /&gt;to turn and moves 200 m north&lt;br /&gt;fin
    14·1 answer
  • Last semester, Henri bought his textbooks over the Internet and saved a considerable amount of money. Classes start in a few day
    12·2 answers
  • You're going to be mowing lawns as a summer job. How long will it take for your
    14·1 answer
  • What is the difference between a key escrow and a recovery agent? (Choose all that apply.)
    12·1 answer
  • When can you message on brainly? My account says I have to answer more questions first.
    6·1 answer
  • What mistake do you think you might make related to changing the data in a cell that's used in a formula?
    14·1 answer
  • How do you delete an credit card off an iPhone 7
    5·1 answer
  • How to write my name in binary code ? Rivas
    7·2 answers
  • Match the definitions to their respective cli hot keys and shortcuts. (not all options are used.)
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!