What is space complexity? Discuss various factors affecting it. Write iterative and recursive algorithm of finding factorial of a given number and find its space complexity.
Explain empirical and theoretical approach for estimating time complexity.
write a C code to add two polynomials having n number of unknown variables
Add a prompt to the CondoSales application to ask the user to specify a (1) garage or a (2) parking space, but only if the view selection is valid. Add $5,000 to the proce of any condo with a garage. If the parking value is invalid, display an appropriate message and assume that the price is for a condo with no garage.
outcome of a game of Rock, Paper, Scissors. You do not need to build the actual game; your main() function does not need to be developed player1 and Player2 will each enter Rock, Paper or Scissors.
Standard rules of who won any given match apply: Rock beats
Scissors. Scissors beats Paper. Paper beats Rock. A Draw occurs if
both players enter the same shape
The requirements of the function are as follows:
The function accepts two char arrays as input
The function outputs a single char array
The char arrays passed to the function can contain any series of characters (i.e. it accepts any word)
The function's main role is to determine who won a game of Rock, Paper, Scissors
The output char array of the function can be 1 of 4 words:
“Player1"
This is the output if Player1 won the match
“Player2"
This is output if Player2 won the match
“Draw"
This is the output if both players entered the same shape
Invalid
how will you use the knowledge you acquired about managing waste electrical and electronic equipment?
4.4 Write a program which reads the social security number SOC of a student and uses LINEAR to find and print the student's record. Test the program using (a) 174-58-0732, (b) 172-55 5554 and (c) 126-63-6382.
IPL Match Details
Write a program that reads all the match outcomes and summarizes the information of all the matches.
Points are given to the terms based on the outcome of the match.
A win earns a team 3 points.A draw earns 1.A loss earns 0.
The following information is expected:
MP:Matches Played
W:Matches Won
D:Matches Drawn(Tied)
L:Matches Lost
P:Points
The team information should be displayed in descending order of points.
Sample input 1
6
CSK;RR;loss
RR;DD;draw
MI;KKR;win
KKR;RR;loss
CSK;DD;draw
MI;DD; draw
Sample output 1
Team: RR, Matches Played: 3, Won: 2, Lost: 0, Draw: 1, Points: 7
Team: MI, Matches Played: 2, Won: 1, Lost: 0, Draw: 1, Points: 4
Team: DD, Matches Played: 3, Won: 0, Lost: 0, Draw: 3, Points: 3
Team: CSK, Matches Played: 2, Won: 0, Lost: 1, Draw: 1, Points: 1
Team: KKR, Matches Played: 2, Won: 0, Lost: 2, Draw: 0, Points: 0
4.1 Write a program for each of the following:
(a) Listing all students whose CUM is K or higher. (Test the program using K = 3.00.)
(b) Listing all students in year L. (Test the program using L= 2, or sophomore.
Add two Polynomials
Given two Polynomials A and B,write a program that adds the given two Polynomials A and B.
Sample input 1
4
0 5
1 0
2 10
3 6
Sample Output 1
Sample Input 2
4
0 5
1 0
2 10
3 6
3
0 1
1 2
2 4
Sample output 2
6x^3 + 14x^2 + 2x + 6