Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Largest Missing Negative Number

You are given an unsorted array

A of N integers. You have to find the largest negative integer missing from the array.Input

The first line contains

N space-separated integers of A.Output

The output contains

N space-separated integers representing the number of people as mentioned above.Explanation

Given

A = -2 -1 0 1 2.The largest negative number missing is

-3.

Sample Input 1

-2 -1 0 1 2

Sample Output 1

-3


Vertical Printing

You are given a string(

S) with multiple words in it. Return all the words vertically in the same order in which they appear in S.Complete with spaces when it is necessary while forming the words vertically. (Trailing spaces are not allowed).

Note: All characters in

S are upper case.Input

The first line contains a string

S.Output

Each line of the output contains a string formed vertically as mentioned above.

Explanation

Given

S = CAT BAT VIN.We are expected to print the words vertically such that considering the

ith letter in each line of the output will form the ith word in the given input.Printing the given words vertically


CBV

AAI

TTN


Joining all the first characters from the 3 lines of output gives

CAT. Joining all the second characters from the 3 lines of output gives BAT. Joining all the third characters from the 3 lines of output gives VIN.

Sample Input 1

CAT BAT VIN

Sample Output 1

CBV

AAI

TTN




Smaller Scores

A group of people(

P) are playing an online game. Their scores are stored in the order of their entry time in S. Each integer S[i] corresponds to the score of the person Pi.For each person

Pi you have to report the number of people who played after the person and scored less than the person.Input

The first line contains a single integer

N. The second line contains N space-separated integers representing the score S[i] of person Pi.Output

The output should contain

N space-separated integers representing the number of people who played after the person and scored less than the person.Explanation

Given

S = 13 12 11Score of

P1 is 13. Score of P2 is 12. Score of P3 is 11.The number of people who played after

P1 and scored less than 13 is 2(12, 11). The number of people who played after P2 and scored less than 12 is 1(11). The number of people who played after P3 and scored less than 11 is 0.

The output is

2 1 0.

Sample Input 1

3

13 12 11

Sample Output 1

2 1 0


Create a library management system in which you have a pile of 4 books stacked over one another. Each book has a book number. Make a program in which a librarian stacks a pile of books over one another. A student wants to issue a book. The program first searches if the book is present in the stack or not. If the book has not been issued, the program finds out the index of the book. It also pops other books on the top of it to issue the book to the student. Display the books in the stack. (Hint: report the count of the books above the required book and use the pop() function “count” times.)


You are given the temperature T of an object in one of Celsius, Fahrenheit, and Kelvin scales.

Write a program to print T in all scales viz Celsius, Fahrenheit, and Kelvin.

Formula to convert from Fahrenheit F to Celsius C is C = (F - 32) * 5 / 9.

Formula to convert from Kelvin K to Celsius C is C = K - 273.

Here "C", "F", "K" represent that the temperature scale is in Celsius, Fahrenheit and Kelvin scales respectively.

The input contains the temperature (a number) and the unit of the temperature scale (C, F, K) without any space.

  1. The output contains temperature in Celsius, Fahrenheit and Kelvin scales in each line in the format similar to input and the value of the temperature is rounded to 2 decimal places.

Input


The first line of the input contain a temperature Value in one of Celsius, Fahrenheit, and Kelvin scales.




Write down the routing table for all routers. Routing protocol used is RIP. The subnet mask used is 255.255.255.0


Write C++ programs that illustrate how the following forms of inheritance are supported:

a)Single inheritance

b)Multiple inheritances

c)Multi-level inheritance

d)Hierarchical inheritance


Design a recursive function that accepts an integer argument, n, and prints every second number from n down to a minimum of 0. Assume that n is always a positive integer.


* Please select the correct letter choice "A, B, C, D, or E"


10. Which can set the background color of "panel1" to red?


A. panel1.setBackground(red);

B. panel1.setBackgroundColor(red);

C. panel1.setBackground(Color) = "red";

D. panel1.setBackground(Color.red);

E. panel1.setBackground = Color.red;


* Please select the correct letter choice "A, B, C, D, or E"


9. Which can nullify a JPanel’s layout manager?


A. pane1.setLayout(void);

B. pane1.setLayout(no);

C. pane1.setLayout(false);

D. pane1.setLayout();

E. pane1.setLayout(null);


LATEST TUTORIALS
APPROVED BY CLIENTS