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

write a program which implements thrads with locks by using synchronized keyword, write a program which ellaborates the concept of producer consumer problem using wait() ,notify() & all required functionalities in it.Write a program with data structure,use atomic methods like get(),incrementAndGet().decrementAndGet().compareAndSet(),etc,also use all other functionalities to make the progrm more responsive

"Write a java program which accepts multiple employees details, 1)Create thread class 2)Execute them using frokjoinpool 3) make the use of runnable interface in it."

How are you getting the prices of the bill?


[10 points] Write a MIPS assembly language program that implements a "Fahrenheit to

Celsius converter". Upon program execution, the user is prompted to enter a

temperature in Fahrenheit and the program will output the corresponding temperature in

Celsius. The formula to convert a temperature given in Fahrenheit (F) to a

temperature in Celsius (C) is C (F- 32)/1.8. Your solution should make use of floating

point (non-integer) values to obtain full marks. If you are not able to work with floating

point numbers, then provide an implementation with integer values (in this case, you can

use the following formula: C = (F 32)/2. A solution that works only with integer values

will result in a decrease of marks but part marks will be provided.


[6 points] Write a MIPS assembly language program version of the following pseudo

code segment:


A[100], B[100], C[100] - three arrays that hold 100 integers each

Declare an integer variable i = 99 to represent a loop index

Repeat the following two instructions while i > 4

   C[i] A[i-2] + B[i-1];

   i = i-2; 


String Concatenation


Disha has three strings A, B, and C consisting of lowercase letters.She also has a string T consisting only of characters 1, 2 and 3.

She wants to concatenate the three strings according to the characters in T.

Your task is to print the final output string.


Note: Formally, follow the below instructions:

* For each integer i such that 1<=i<=|T|, let the string si be defined as follows:

  • A if Ti = 1.
  • B if Ti = 2.
  • C if Ti = 3.

*Concatenate the strings s1,s2,...,s|T| in this order and print the resulting string.


Sample Input1

mari

to

zzo

1321


Sample Output1

marizzotomari


Unique Matrix

You are given a N*N matrix. write a program to check if the matrix is unique or not. A unique Matrix is a matrix if every row and column of the matrix contains all the integers from 1 to N


Input

The first line contains an integer N.

The next N lines contains N space separated values of the matrix.


Output:

The output contains a single line and should be True if the matrix is unique matrix and False otherwise.


Sample input:

4

1 2 3 4

2 3 4 1

3 4 1 2

4 1 2 3

Sample output:

True


Sample Input2

4

1 2 3 3

2 3 4 1

3 4 1 2

4 1 2 3

Sample Output

False



Scoring

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


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 11 Score 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

Sample Input 2

4

4 3 5 2

Sample Output 2

2 1 1 0


class CSR


private data


members:


int csrID – a integer to hold employee identification numbers between 1 and 7.


char *csrName


int hours


int complaintsResolved


float payrate


payRate = $25 + 25*(complaintsResolved by each CSR/total complaints resolved)


float wage – wages = hours * payrate


static int totalComplaintsResolved


1 void calcPayrate() – a function to calculate the employees payrate


2. void calcWage() – a function to calculate the employee’s wage


3. static int getTotalCpsResolved() – a static function to get total complaints resolved


Functions:


1. CSR getCSR_at(CSR employees[7], int index) – returns the CSR object at the given array index

2. void calcTotalComplaints (CSR employees[7] ) – a function that sums the complaints

3. void calcAllEmployeeWages(CSR employees[7])

4. void SortByHours(CSR employees[7]) – sorts employees in descending order based on

hours worked.

5. void SortByComplaintsRes(CSR employees[7]) - similar above

6. void SortByWages(CSR employees[7]) //


Game


There are N people in a party numbered 1 to N. Sruthi has K cards with her. Starting with person A, she gives the cards one by one to the people in the party in the numbering order: A, A+1, A+2, . .., N, 1, 2,..., A-1. Your task is to output the number of the person who will get the last card.


Input

The only line of input contains space separated integers N, K and A.


Output

print the number representing the person who will get the last card.


Explanation

Given N=3, K=3 and A=2.

Distribution of cards starts from 2. The final order of person is 2,3,1.

The last person to get the card is 1.


Sample Input1

3 3 2

Sample Output1

1


Sample Input 2

1 100 1

Sample Output2

1


LATEST TUTORIALS
APPROVED BY CLIENTS