Implement doubly linked list using dummy node with following operations.
1. ins key_of_y key_of_x (insert command)
/*
Insert node x after node y. First search node y using a key value. If node y is found then insert node x after node y. Otherwise insert node x after dummy node.
*/
2. del key_of_x (remove command)
/*
Search a node x using a key value then delete it from the list if found.
*
3. sch search_key (search command)
/*
Search whole linked list against a key number.
*/
4. shw (showall command)
/*
Traverse whole linked list and print all key values.
*/
5. ext (exit command)
/*
Exit from the program.
Input:
ins 3 1
ins 1 2
ins 1 3
ins 2 4
ins 5 0
ins 0 2
shw
del 2
del 2
del 2
del 0
shw
sch 1
sch 2
ext
Output:
INSERT after dummy node.
INSERT after 1.
INSERT after 1.
INSERT after 2.
INSERT after dummy node.
INSERT after 0.
0 2 1 3 2 4
Node with key value 2 is DELETED.
Node with key value 2 is DELETED.
DELETE not possible.
Node with key value 0 is DELETED.
1 3 4
Node with key value 1 is FOUNDED.
Not FOUND.
Question 1:
Distinguish between analogue and parametric estimation in cost management
Question 2:
Examine the importance of quality auditing in project management.
Write a program to compute the volume of a cylinder.your program reads the redius and length and computes using the formula
Area =radius *radius *pi
Volume =area =*length.
Edit, Debug and Run the given Python script files
"""In distributed systems, it is a good idea to segregate threads into groups
if they are performing different tasks. Say, for instance, you have an
application that both listens for incoming stock price changes
and also tries to predict where that price will go. You could, for instance,
have two different thread groups here: one group listening for the changes
and the other performing the necessary calculations.
"""
import threading
import time
def myThread():
print("Thread {%} starting".format(threading.currentThread().getName()))
time.sleep(10)
print("Thread {} ending".format(threading.currentThread().getName()))
for i in range(4):
threadName = "Thread-" + str(i)
thread = threading.Thread(name=threadName, target=myThread)
thread.start()To fork a process is to create a second exact replica of the given process. i.e., When we fork something, we effectively clone it and then run it as a child process of the process that we just cloned from. The newly created process gets its own address space as well as an exact copy of the parent's data and the code executing within the parent process. The new cloned process receives its own unique (PID) Process identifier, and is independent of the parent process from which it was cloned.
Now, you’re required to write a Python script for forking existing processes by following this algorithm:
1.start by importing the os (operating systems) Python module.
2.then define two distinct functions, one called child() and another called parent(). Both the child() and the parent() just print out the process identifier(PID).
Ordered Matrix
Given a M x N matrix, write a program to print the matrix after ordering all the elements of the matrix in increasing order.Input
The first line of input will contain two space-separated integers, denoting the M and N.
The next M following lines will contain N space-separated integers, denoting the elements of each list.Output
The output should be M lines containing the ordered matrix.
Note: There is a space at the end of each line.Explanation
For example, if the given M is 3 and N is 3, read the inputs in the next three lines if the numbers given in the next three lines are the following.
1 20 3
30 10 2
5 11 15By ordering all the elements of the matrix in increasing order, the ordered matrix should be
1 2 3
5 10 11
15 20 30Sample Input 1
3 3
1 20 3
30 10 2
5 11 15
Sample Output 1
1 2 3
5 10 11
15 20 30
Sample Input 2
2 5
-50 20 3 25 -20
88 17 38 72 -10
Sample Output 2
-50 -20 -10 3 17
20 25 38 72 88
Given polynomial, write a program that prints poly in Cix^Pi + Ci-1x^Pi-1 + ..+ C1x + C0 format.
I/p
The 1st line contains a single integer N.
Next N lines contain 2 integers Pi, Ci separated with space, Pi denotes power and Ci denotes coef of Pi.
O/p
Print poly in format Cix^Pi + Ci-1x^Pi-1 + .. + C1x + C0, Pi's r powers in dec order, Ci is coeff, & C0 is constant. There will be space before & after + or - sign.
If coeff is 0, don't print term.
If term with highest degree is -ve, term should represent -Cix^Pi.
For term power is 1, represent it as C1x instead of C1x^1.
If the poly degree is 0 & constant term is also 0, then print 0 to represent the poly.
For term Cix^Pi, if coef of term Ci is 1, print x^Pi instead of 1x^Pi.
Exp:
If N = 4
For power 0, the coef is 5
1, the coef is 0
2, the coef is 10
3, the coef is 6.
Then poly n represents "6x^3 + 10x^2 + 5"Constraints
N <= 100
0 <= Pi < 1000
-1000 <= Ci <= 1000
Sample I/p
4
0 5
1 0
2 10
3 6
Sample O/p
6x^3 + 10x^2 + 5