Write at least one paragraph with a minimum of 100 words on the Tang Dynasty period in China and why that period was considered the “Flowering of the Chinese Civilization.” Include a look at the inventions, the literature (poetry) and interaction with other cultures in your discussion.
In: Economics
C++ How can I print out the subtrees in my self-balancing tree? What I would like to do is have it display something like " ROOT = X, LEFT PARENT = X, X,X, RIGHT PARENT = X,X,X.
Here is my code:
#include <iostream>
using namespace std;
class TreeNode
{
public:
int data;
TreeNode* left;
TreeNode* right;
};
TreeNode* newNode(int data);
/* A function that constructs Balanced
Binary Search Tree from a sorted array */
TreeNode* convertToBTS(int arr[],
int start, int end)
{
if (start > end)
return NULL;
//make the middle number the root
int mid = (start + end) / 2;
TreeNode *root = newNode(arr[mid]);
root->left = convertToBTS(arr, start,
mid - 1);
root->right = convertToBTS(arr, mid + 1, end);
return root;
}
/* Helper function that allocates a new node
with the given data and NULL left and right
pointers. */
TreeNode* newNode(int data)
{
TreeNode* node = new TreeNode();
node->data = data;
node->left = NULL;
node->right = NULL;
return node;
}
//The array will be sorted in PreOrder
void preOrder(TreeNode* node)
{
if (node == NULL)
return;
cout << node->data << " ";
preOrder(node->left);
preOrder(node->right);
}
int main()
{
const int SIZE = 7;
int arr[SIZE];
int count = 7, num = 0;
cout << "We will construct a Self-Balancing Tree!\n Enter 6 numbers for the nodes." << endl;
for (int i = 0; i < SIZE; i++)
{
cout << "Enter " <<
count << " more items!" << endl;
cin >> arr[i];
count--;
}
int n = sizeof(arr) / sizeof(arr[0]);
/* Convert List to BST */
TreeNode *root = convertToBTS(arr, 0, n - 1);
cout << "The tree will be displayed in
PreOrder!" << endl
<< "First number will be the
ROOT. Then LEFT SUBTREE, and RIGHT SUBTREE." << endl;
preOrder(root);
return 0;
}
In: Computer Science
Describe how the Rational User Process can accommodate agile process. Specify in what phases and what disciplines agile methods could be appropriate.
In: Computer Science
You are the lead auditor performing a walkthrough of the bank reconciliation performed by the company controller. What is the design deficiency of the control below ? What additional steps should the Controller perform ?
The Controller says, "I first review the sorted list of returned checks and find which numbers are missing. Second I determine the amount uncleared checks by referring to the cash disbursements journal. If the bank accounts reconcile at that point, the review is done. If it does not reconcile I search for in transit deposits, checks from the beginning outstanding checks list that still have not cleared, other reconciling items and bank errors until it reconciles."
In: Accounting
5. In recent years, about twenty states have passed so-called medical marijuana laws. Typically, these laws permit individuals to lawfully purchase marijuana from licensed stores, providing they have a letter from their doctor recommending its uses. In a number of these states, the price of medical marijuana is observed to be higher than that of the pot sold illegally just down the street. Use the reasoning in this chapter to explain (a) why people would be willing to pay a higher price for the medical marijuana, and (b) why it might be misleading to compare the observed price of the medical variety with the observed price of the illegal weed.
In: Economics
What roles does HRM perform relative to each international business strategy of ethnocentric, geocentric and polycentric staffing models?
In: Operations Management
Explain why the client congestion window(cwnd) size varies differently for different load conditions. In context to tcp congestion control using aimd technique and tcp reno protocol.
In: Computer Science
Calculate the pH of a buffer solution prepared by dissolving 4.2 g of NaHCO3 and 5.3 g of Na2CO3 in 0.20 L of water. Will the pH change if the solution volume is increased by a factor of 10?
In: Chemistry
Assume you are considering a portfolio containing two assets, L and M. Asset L will represent 39% of the dollar value of the portfolio, and asset M will account for the other 61%. The projected returns over the next six years, 2018–2023, for each of these assets are summarized in the following table. *huge thumbs up for correct answers*
Projected Return (%)
(Year) (Asset L) (Asset M)
(2018) (14%) (21%)
(2019) (13%) (19%)
(2020) (15%) (16%)
(2021) (17%) (15%)
(2022) (18%) (11%)
(2023) (20%) (10%)
a.Use an Excel spreadsheet to calculate the projected portfolio
return, rp, for each of the six years.
b. The average expected portfolio return, rp, over the 6-year period is (blank) %
c. The standard deviation of expected portfolio returns over the 6-year period is (blank) %
d. How would you characterize the correlation of returns of the two assets L and M? (neg. pos. or un-correlated)
e. Discuss any benefits of diversification achieved through creation of the portfolio.
A. By combining these two negatively correlated assets, the overall portfolio risk is increased.
B. By combining these two positively correlated assets, the overall portfolio risk is reduced.
C. By combining these two negatively correlated assets, the overall portfolio risk is reduced.
D.By combining these two negatively correlated assets, the overall portfolio risk is eliminated.
In: Finance
Consider an object with a mass of 3.5 kg located at R1 = (0.0 m, 2.5 m), another object with a mass of 3.5 kg located at R2 = (1.5 m, 1.5 m), and a third object with a mass of 8.5 kg located at R3 = (– 2.5 m, 2.5 m), and a fourth object with a mass of 5.0 kg located at R4 = (2.5 m, 0.0 m). Calculate the center of mass of this group of four objects. Give your answer in the form Rcm = (xcm, ycm) and with 2 significant figures.
In: Physics
Block 1, with mass m1 and speed 3.5 m/s, slides along an x axis on a frictionless floor and then undergoes a one-dimensional elastic collision with stationary block 2, with mass m2 = 0.67m1. The two blocks then slide into a region where the coefficient of kinetic friction is 0.57; there they stop. How far into that region do (a) block 1 and (b)block 2 slide?
In: Physics
Deriving cash flows for asset disposition. Custom Machining Company (CMC) purchased a made-to-order machine tool for grinding machine parts. The machine costs $160,000, and CMC installed it yesterday. Today, a vendor offers a machine tool that will do exactly the same work but costs only $80,000. Assume that the cost of capital is 12 percent, that both machines will last five years, that CMC will depreciate both machines on a straight-line basis for tax purposes with no salvage value, that the income tax rate is and will continue to be 40 percent, and that CMC earns sufficient income that it can offset any loss from disposing of or depreciating the ‘‘old’’ machine against other taxable income. How much, at a minimum, must the ‘‘old’’ machine fetch upon resale at this time to make purchasing the new machine worthwhile?
I have asked the question before, but I do not understand how depreciation * tax rate (for example $16,000* .4 = $64,000, instead of $4,000 or $32,000* .4= $128,000, instead of $8,000?).
In: Accounting
A steam pipe is covered with 1.50-cm thick insulating material of thermal conductivity of 0.200 cal/cm · °C · s. How much energy is lost every second when the steam is at 240°C and the surrounding air is at 20.0°C? The pipe has a circumference of 800 cm and a length of 50.0 m. Neglect losses through the ends of the pipe.
In: Physics
Suppose a bridge has 10 toll booths in the east-bound lane: four are only for E-Z Pass holders, two are only for exact change, one takes only tokens, and the remainder are manned by toll collectors who accept only cash. During heavy-traffic hours it is difficult to see the signs indicating the type of toll booth. Suppose a driver selects a toll booth randomly.
a. What is the probability that an exact-change toll booth is selected?
b. What is the probability that a manual-collection toll booth or the token toll booth is selected?
c. What is the probability that an E-Z Pass toll booth is not selected?
d. Suppose the driver has only tokens. What is the probability of selecting the appropriate toll booth?
In: Math
Illustrate with a diagram how basic TCP Windowing works.
In: Computer Science