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

Polynomial


Given polynomial,write a program that prints polynomial in Cix^Pi + Ci-1x^Pi-1+....+C1x+C0 format.


Input


The first line contains a single Integer N.

Next N lines contain two integers Pi,Ci separated with space, where Pi denotes power and Ci denotes coefficient of Pi.


Sample Input 1

5

0 2

1 3

2 1

4 7


Sample output 1

7x^4 + 6x^3 + x^2 + 3x + 2


Sample input 2

4

0 5

1 0

2 10

3 6


Sample output 2

6x^3 + 10x^2 + 5


Don't you find it amazing to discover words and sentences that have the same first and last letter? We just don't usually notice them, so we can try it out by coding out this problem instead! Print out "Yes" if the first and last characters of the given string are the same, and "No" otherwise. It doesn't matter if they're in lowercase or uppercase, as long as it's the same letter, it fits the description.

So, what are you waiting for? Code now!


Write a recursive method named series (int a, int n) that takes as a parameter an integer that may  compute the following series: 

-2, 7, 52, 2702… if a = -2 and n = 4 


Then, write a full program to solve the above problem using recursion. 




Given an integer N  denotes N×N  matrix. Initially, each cell of matrix is empty. U r given K  tasks. In each task, you are given a cell (i,j)  where cell (i,j)  represents

ith  row and jth  column of given matrix.

I/p format

  • first line contains two space-separated integers N and K where N is number of rows and columns in given matrix and K is number of tasks respectively.
  • Next K lines contain two space-separated integers i and j.

O/p format

Print K space-separated integers denoting numberr of empty cells in matrix.

Constraints

1≤N≤105

1≤K≤1000

1≤i,j≤N

Sample Input

3 3  ==>   Matrix Size is 3  and Tasks is 3.  

It should be a square matrix like 2 4 6 8...and max can be 100 x 100

Initial Matrix


Final Result

4 2 0


Initially all cells [{1, 1}, {1, 2}, {1, 3}, {2, 1}, {2, 2}, {2, 3}, {3, 1}, {3, 2}, {3, 3}] are empty.

After first task:

Empty cells are [{2, 2}, {2, 3}, {3, 2}, {3, 3}]. Therefore, answer is 4.

After second task:

Empty cells are [{2, 2}, {3, 2}]. Therefore, answer is 2.

After third task:

No cells remain empty. Therefore, answer is 0.




Procedure:

1. Create a folder named LastName_FirstName in your local drive. (ex. Reyes_Mark)

2. Using NetBeans, create a Java project named MovieTime. Set the project location to your own folder.

3. Import Scanner, Queue, and LinkedList from the java.util package.

4.Create two (2) Queue objects named movies and snacks.


Implement LinkedList using STL in c++. [#include <list> ,#include <iterator>]

Create two lists L1 and L2 of length 10, filling with the values of multiples of 2 and 3 respectively in L1 and L2. (hint: use push_back())

a. Show the contents of the list using iterators

b. Reverse the list L1 and display its contents (reverse())

c. Sort the list L2 and display its contents (sort())

d. Remove the element from both the sides of L1 and display its contents (pop_front() ,pop_back())

e. Add the elements to both the front and back sides of L2 and display its contents.


Write a recursive method named series (int a, int n) that takes as a parameter an integer that may compute the following series:

-2,7,52,2702... if a=-2 and n=4

Then, write a full program to solve the above problem using recursion.


choose two characters a and b in the string. swap a with b if and only if the sum of ascii values a and b are odd


you know all the n friends,have all the phone numbers and can give anyone any phone number.thus, you can always add any relation you want. you have to determine the minimum number of relations to add so that all friends can reach the sick one. input:the first line contains an integer,n, denoting the number of friends python code




Create a program for circular linked list which perform some functions which are as follows:-


1:- Append Node


2:- Prepend Node


3:- Insert Node After a Specific Position


4:- Delete Node


5:- Update Node


6:- Display




LATEST TUTORIALS
APPROVED BY CLIENTS