repeat exercise 7.20 when the pivot is chosen as a. the first element b. the larger of the first two distinct elements c. a random element ⋆d. the average of all elements in the set

Answers

Answer 1

In each iteration, the algorithm selects a pivot element and rearranges the other elements such that elements less than the pivot are moved to the left of it, while elements greater than the pivot are moved to the right of it.

If we select the first element of the array as the pivot, then the quicksort algorithm will work as follows:
1. Choose the first element as the pivot.
2. Partition the array around the pivot, such that all elements less than the pivot are on the left, and all elements greater than the pivot are on the right.
3. Recursively apply the algorithm to the left and right sub-arrays.

One of the main drawbacks of choosing the first element as the pivot is that if the input array is already sorted, then the algorithm's time complexity becomes O(n^2). This happens because the pivot will always be the smallest element, and the algorithm will need to partition the array for every element, leading to unnecessary comparisons and swaps.

To know more about algorithm  visit:-

https://brainly.com/question/24452703

#SPJ11


Related Questions

QUESTION 3 [20 Marks]
Self-Service Technologies (SSTs) have led to a reduction of and in some instances a complete elimination of person-toperson interactions. However, not all SSTs improve service quality, but they have the potential of making service transactions more accurate, convenient, and faster for the consumer. With the foregoing statements in mind, evaluate the wisdom of introducing SSTs by banking institutions and conclude by commenting on reasons for slow adoption of SSTs in South Africa.

Answers

Self-Service Technologies (SSTs) are becoming increasingly common in all sectors, including the banking industry. SSTs have made transactions more accurate, convenient, and quicker for consumers, resulting in a reduction or complete elimination of person-to-person interactions. However, not all SSTs improve service quality. In this article, we'll evaluate the wisdom of introducing SSTs by banking institutions and explain the reasons for the slow adoption of SSTs in South Africa.

SSTs are advantageous to banking institutions in many ways, including reducing transaction costs, increasing transaction speed, and providing customers with additional convenience. However, banks must strike a balance between introducing new technology and ensuring that it does not hinder the customer experience and that it is simple to use. The following are some reasons for the slow adoption of SSTs in South Africa:

Costs - SSTs can be costly, particularly for smaller banks that cannot afford to invest in them. Some consumers may prefer not to pay for SSTs, which can discourage adoption. Simplicity - SSTs must be simple to use, or customers may not use them. Banks must ensure that SSTs are simple to use and that customers are given adequate guidance in using them.Security - SSTs must be secure; otherwise, customers will be hesitant to use them. Banks must assure that their security measures are up to date and effective.Theft - Another factor that hinders SST adoption is the threat of theft or fraud. Banks must ensure that their SSTs are safe to use and that they are not easy to steal or damage.

In conclusion, the adoption of SSTs by banks has been advantageous, but it must be done cautiously to ensure that the customer experience is not jeopardized. Banks should carefully consider the advantages and disadvantages of introducing SSTs and strike a balance between innovation and customer service. The slow adoption of SSTs in South Africa may be attributed to a lack of resources, reluctance to change, and security concerns, among other factors. However, banks can mitigate these issues by ensuring that their SSTs are simple to use, secure, and cost-effective.

To learn more about Self-Service Technologies, visit:

https://brainly.com/question/31664676

#SPJ11

write code that assigns the average of the numbers from 1 to n (where n is a positive integer value) to the variable ave.

Answers

The code snippet below calculates the average of numbers from 1 to a given positive integer n and assigns the result to the variable "ave".

To calculate the average of numbers from 1 to n, we need to find the sum of these numbers and divide it by the total count. In the code snippet provided, we initialize the variables "n" and "sum" to hold the input value and the running sum, respectively. Then, using a for loop, we iterate from 1 to n and add each number to the sum. Finally, we calculate the average by dividing the sum by n and assign it to the variable "ave".

n = int(input("Enter a positive integer: "))

sum = 0

for num in range(1, n+1):

sum += num

ave = sum / n

print("The average is:", ave)

This code snippet ensures that the user inputs a positive integer value for "n" and calculates the average by summing the numbers from 1 to n and dividing the sum by n. The result is then assigned to the variable "ave" and printed out.

Learn more about code here: https://brainly.com/question/30029994

#SPJ11

enter a formula in cell d2 to calculate c2/c14 rounded to 3 decimal places

Answers

To calculate the value of c2/c14 rounded to 3 decimal places in cell d2, you can use the formula =ROUND(c2/c14, 3).

The ROUND function is used to round the result of the division operation to the specified number of decimal places. In this case, we want to round to 3 decimal places, so we use the second argument of the ROUND function as 3.  The formula takes the value in cell c2 and divides it by the value in cell c14. The resulting value is then rounded to 3 decimal places using the ROUND function. The final result is displayed in cell d2. It's important to note that the ROUND function only changes the display of the value in the cell, not the actual value. If you need to use the rounded value in another calculation, it's best to reference the cell where the formula is entered, rather than the original cells containing the values being divided.

Overall, the formula for calculating c2/c14 rounded to 3 decimal places is straightforward and can be easily modified to round to a different number of decimal places, depending on your needs.

Learn more about operation here: https://brainly.com/question/30415374

#SPJ11

what are the component of cyber law?​

Answers

Answer:

The very important component is "intellectual property".

Explanation:

Cyberlaw seems to be a component of the entire judicial process dealing with either the World wide web, virtual worlds as well as their corresponding legal problems. Intellectual property may also include locations such as technologies, literary criticism, songwriting, as well as industry. Nowadays it provides electronic products that are already offered mostly on the online platform.

a field service technician is replacing a server motherboard that supports cpus with multithreading capabilities. the technician notices the motherboard has four processor sockets. if each socket supports a quad-core processor, how many logical processors does the system appear to have?

Answers

If each physical core can handle the simultaneous execution of two threads, the system would appear to have 32 logical processors (or threads).

Which of the following capabilities on Intel chips best enables a single CPU to operate two threads in parallel?

A hardware advancement called Intel® Hyper-Threading Technology enables several threads to execute on each processor. Multiple threads enable concurrent execution of more tasks.

Which computer memory is being used by the CPU to process data and powerful programmes right now?

Programs and data presently being processed by the CPU Internal memory are stored in the computer memory. RAM is a type of storage. A application is loaded into Memory when it is launched. The Processor then retrieves instructions in machine language.

To know more about processors visit:-

https://brainly.com/question/28255343

#SPJ1

PLEASE HELP!! This is a question. Please answer using python. Only if you have experience. I will give the first person brainliest!

PLEASE HELP!! This is a question. Please answer using python. Only if you have experience. I will give

Answers

Answer:

what question is this ?? can you be more specific i need more details on the question

Explanation:

The program written in Python programming language that performs the required computations is:

n = int(input("n: "))

while n != 1:

   if n%2 == 0:

       n = int(n/2)

   else:

       n = int(3 * n + 1)

   print(n)

How to write the program in Python programming language?

The program written in Python programming language, where comments are used to explain each line is as follows:

#This gets input for n

n = int(input("n: "))

#The following loop is repeated until the value of n is 1

while n != 1:

#This checks if n is an even number; n is halved, if this condition is true

   if n%2 == 0:

       n = int(n/2)

#If n is an odd number; n is tripled and increased by 1

   else:

       n = int(3 * n + 1)

#This prints the sequence of numbers generated

   print(n)

The above program generates the sequence of numbers for n

Read more about python programs at

https://brainly.com/question/26497128

#SPJ1

Safari, Chrome, and Internet Explorer 9 all support MP3 files. What do you need for Firefox and Opera?

A. Ogg VorbisB. WavC. MP4D. Wavform

Answers

For Firefox and Opera, you need to use the Ogg Vorbis format to support MP3 files. The Ogg Vorbis format is an open-source audio format that is commonly used in these browsers as an alternative to MP3.

It provides good audio quality while maintaining a relatively small file size. To ensure compatibility with Firefox and Opera, it is recommended to convert MP3 files to the Ogg Vorbis format when working with these browsers. This can be done using various audio conversion tools or software. Simply select the MP3 file and choose the Ogg Vorbis format as the output. This will ensure that the audio file can be played without any issues in Firefox and Opera browsers.

Learn more about Ogg Vorbis format

https://brainly.com/question/19261081?

#SPJ11

The ______ moving air alone will charge suspended particles and cause the buildup of static electrical charges on people and objects in the environment​

Answers

Answer:

friction

Explanation:

the resistance that one surface or object encounters when moving over another. Alsothe action of one surface or object rubbing against another.

Use the Format Data Labels task pane to display Percentage data labels and remove the Value data labels. Close the task pane.

Answers

To display percentage data labels and remove the value data labels using the Format Data Labels task pane in Microsoft Excel, follow these steps: 1. Select the chart that contains the data labels you want to modify. 2. Click on any data label to select all data labels in the series. You can also click on an individual data label to modify only that specific one.

3. Right-click on the selected data labels and choose "Format Data Labels" from the context menu. This will open the Format Data Labels task pane on the right side of your screen. 4. In the task pane, you will see various options for customizing data labels. To display percentage data labels, check the "Percentage" option under the "Label Options" category. This will add percentage data labels to your chart. 5. To remove the value data labels, uncheck the "Value" option, which is also located under the "Label Options" category. This will remove value data labels from your chart.

6. Adjust any other settings in the task pane as needed, such as label position or font style.
7. Once you are satisfied with the changes, close the Format Data Labels task pane by clicking the "X" in the upper right corner. By following these steps, you can easily display percentage data labels and remove the value data labels using the Format Data Labels task pane in Excel.

Learn more about Microsoft Excel here-

https://brainly.com/question/30750284

#SPJ11

Which are steps taken to diagnose a computer problem? reproducing the problem and using error codes reproducing the problem and troubleshooting using error codes and troubleshooting using error codes and stepping functions

Answers

The step taken to diagnose a computer problem is using error codes and troubleshooting. The correct option is C.

What is troubleshooting?

A methodical method of problem-solving known as troubleshooting is frequently used to identify and resolve problems with sophisticated machinery, electronics, computers, and software systems.

The term troubleshooter, or in the 1890s, trouble-shooter, is where the verb troubleshoot first appeared in the early 1900s. Workers who fixed telephone or telegraph lines were known by this moniker.

The appearance of this infamous error screen on your Windows computer screen indicates that malfunctioning hardware has caused the operating system to experience a "stop error."

Therefore, the correct option is C, using error codes and troubleshooting.

To learn more about troubleshooting, refer to the link:

https://brainly.com/question/30048504

#SPJ5

Name four (4) important agile techniques that were introduced in Extreme Programming (XP).

Answers

Sure, I'd be happy to help. Four important agile techniques introduced in Extreme Programming (XP) are: Pair Programming: This is a technique where two programmers work together on the same code, with one person writing the code and the other reviewing it simultaneously. This enhances code quality and promotes knowledge sharing.

Test-Driven Development (TDD): In this technique, developers first write automated tests for a new feature or functionality, and then write the code to fulfill those tests. This ensures code quality and reduces the chances of introducing bugs.
3. Continuous Integration: This technique involves regularly merging code changes into a shared repository, allowing the team to detect and fix integration problems early on in the development process.
4. Refactoring: This is the practice of continuously improving the design and structure of the codebase without altering its functionality. Refactoring helps maintain code quality and makes it easier to add new features or adapt to changing requirements.

To learn more about programmers click the link below:

brainly.com/question/14190382

#SPJ11

An input mask is another way to enforce data integrity. An input mask
guides data entry by displaying underscores, dashes, asterisks, and other
placeholder characters to indicate the type of data expected. For
example, the input mask for a date might be __/__/____. Click Input Mask
in the Field Properties area of Design view to get started.

Answers

The statement "An input mask is another way to enforce data integrity. An input mask guides data entry by displaying underscores, dashes, asterisks, and other placeholder characters to indicate the type of data expected" is true. For example, an input mask for a date might be //__.

Why is the statement true?

An input mask serves as an excellent method to uphold data integrity. It acts as a template used to structure data as it is being inputted into a specific field. This approach aids in averting mistakes and guarantees the entry of data in a standardized manner.

For instance, an input mask designed for a date field could be represented as //____. This input mask compels the user to input the date following the format of month/day/year. If the user attempts to input the date in any other format, the input mask restricts such input.

Learn about input mask here https://brainly.com/question/3147020

#SPJ1

Write Types Of Computer Based On Size Vost And Performance.(Min1page)​

Answers

Answer:

On the basis of size there are four types of computer. They are minicomputer, micro computer, mainframe computer and super computer. Super computer is the fastest, most expensive, big in size, and most powerful computer that can perform multiple tasks within no second.

You can us the (BLANK) symbol when you want to automatically add a set of numbers together in a spreadsheet

Answers

Answer:

Σ

Explanation:

What symbol can you use when you want to automatically add a set of numbers together on excel?

✓ Σ This is the Greek letter Sigma. It is used to start the Autosum facility.

Which subnet would include the address 192. 168. 1. 96 as a usable host address?.

Answers

Answer:

192.168.1.64/26

Explanation:

For the subnet of 192.168.1.64/26, there are 6 bits for host addresses, yielding 64 possible addresses. However, the first and last subnets are the network and broadcast addresses for this subnet. Therefore, the range of host addresses for this subnet is 192.168.1.65 to 192.168.1.126. The other subnets do not contain the address 192.168.1.96 as a valid host address.

How can you reduce the likelihood of wps brute-force attacks?

Answers

One can reduce the likelihood of wps brute-force attacks if they Implement lockout periods for incorrect attempts.

What is a Brute Force Attack?

This refers to the type of hacking that is done when a system or algorithm tries out multiple password combinations and sequences until it gets the right one.

Hence, we can see that based on the vulnerability of the WPS system to a brute force attack, it is recommended that there is the implementation of lockout periods for incorrect attempts.

Read more about brute force attacks here:

https://brainly.com/question/17277433

#SPJ1

Choose the correct term to complete the sentence.

Professional communication must be objective,

, and unemotional
informal
technical
rational

Answers

Answer:

the answer to your question is obviously "rational"

The correct option is rational.

What is Professional communication?Professional communication is a metier subfield of communication that pays close concentration to the theories and methods of communication within professional contexts.After reading this direction, you will better comprehend the four main types of contact: Verbal, non-verbal, written, and visual. You will be able to use this knowledge to improve your transmission and make sure that you are encouraging effective communication skills within your organization. Proficient communication refers to the oral, written, visual, and digital forms of providing information in the context of a workplace. Practical professional communication is essential in today's world. Most situations in an institution arise as a result of poor communication.

To learn more about Professional communication, refer to:

https://brainly.com/question/26152499

#SPJ2

The owner of an organic pet food store would like to analyze the sales data to determine if the
business is growing, declining or remaining flat. The owner has the following data:
Sales Revenue Last Year = $350,000
Sales Revenue Current Year = $402,500
What is the sales growth?
0000
13%
10%
15%
17%

Answers

Answer:

Growth sales  15%

Explanation:

Let's make a proportion:

$350,000   -   100%

$402,500   -    X%

X = $402,500 * 100% / $350,000 ≈ 115%

Growth sales:

115% - 100% = 15%

which one of the following is not considered a quantitative risk assessment technique?

Answers

Quantitative risk assessment is a method of assessing the risks associated with a particular project or activity. It involves the use of numerical values and statistical analysis to determine the probability and potential impact of various risks.

There are several quantitative risk assessment techniques that can be used to evaluate risk. These techniques include probabilistic risk assessment (PRA), fault tree analysis (FTA), event tree analysis (ETA), and Monte Carlo simulation.
Probabilistic risk assessment (PRA) is a technique that is used to quantify the probability and impact of potential risks. It involves the use of mathematical models to evaluate the likelihood of various scenarios and to estimate the potential consequences of those scenarios.Fault tree analysis (FTA) is another quantitative risk assessment technique that is used to identify the potential causes of a particular risk. FTA involves breaking down a complex system into smaller components and evaluating the potential failure modes of each component.

To know more about Quantitative risk assessment visit:

brainly.com/question/31565073

#SPJ11

How do you flatten a 2D array to become a 1D array in Java?

Answers

Answer:

With Guava, you can use either

int[] all = Ints.concat(originalArray);

or

int[] all = Ints.concat(a, b, c);

Explanation:

Use GUAVA

You are working as an intern for an Internet Service Provider. You are asked to assist a senior network engineer on a field day. The network engineer calls you and tells you to carry along a device to measure all the frequencies within a scanned range. Which of the following devices will you carry in this situation? (Choose One)
a. Captive Portal
b. Spectrum Analyzer
c. Radius
d. Wi-Fi Analyzer

Answers

Spectrum analyzer, option b, will be the tool employed in this circumstance.

What does an assistant network engineer do?

Installing, configuring, testing, and documenting the hardware and network systems in accordance with the plan and specifications helps to construct the networking environment. helps with routine networking chores so that there is no disruption to the network's dependability, availability, and serviceability.

What do network service technicians typically do?

It is the responsibility of network technicians to design and install efficient computer networks and systems. Internet cables and electronic cabling are installed by them. To preserve long-term effectiveness within a region, they could also carry out troubleshooting on system issues.

To know more about Network engineer visit:

https://brainly.com/question/30723224

#SPJ1

one way to copy a folder to a new location is to right-click the folder and select copy, then move to the new location, right-click and select.

a. True
b. False

Answers

The answer is a. True

The statement "one way to copy a folder to a new location is to right-click the folder and select copy, then move to the new location, right-click and select" is definitely true.

How do you copy a folder?

You can copy a folder by right-clicking on it. There you will see an option like a move or copy. Select what to want to do. And then go to the destination where you want to get copied. Right-click on the place and click copy here.

According to the context of this question, if you want to copy any folder or file, follow the step one by one in a sequential manner. To copy a folder or file to a new location, right-click the folder and select copy, then move to the new location, right-click and select. Your process of copying a folder is completed.

Therefore, the statement "one way to copy a folder to a new location is to right-click the folder and select copy, then move to the new location, right-click and select" is definitely true.

To learn more about File and folders, refer to the link:

https://brainly.com/question/20262915

#SPJ12

What is the difference between myList.length and myList.length - 1? When would you use myList.length? When would you use myList.length - 1?

Answers

Answer:

The difference between myList.Length and myList.length - 1 is that with the second variable, you are subtracting 1 from the total (assuming it is a integer)

Explanation:

Assuming the variable myList.Length is a integer, like for example, 4, it would be equal to 4, while myList.Length - 1 would be 3.

Which feature of a lyric poem does the repetition of the word let best illustrate?

Answers

Answer:

Alliteration.

Alliteration is the repetition of words or sounds through a poem to make it sound more fluent. Like rhyming words.

"The town was really eerie, then it got really dreary, then the town is weary"."Mouse and mice, they like to eat cheese. Their cheese is shaped like dice, then they see some bees, now they're on the run."

Hope this helps!

10. The technology used to weave patterns into cloth inspired the future creation of computer data storage and retrieval

True or false?!

Answers

Your answer would be false

HELPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP!!!
Express the diagram in the form of a logic statement. [2]
P = ________________________
3. (a) Complete the truth table below for the logic circuit which is made up of NAND gates only.

HELPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP!!!Express the diagram in the form of a logic statement. [2] P = ________________________3.

Answers

Answer:

different or difference between Dot-matrix and Daisy-wheel printer

what is the full form of GUI​

Answers

Graphical User Interface

compare and discuss between electromechanical and electronic era of computer​

Answers

Answer:

The difference between electromechanical and electronic era of computer​ is that electomaechanical era was between the date of 1840 and 1940.These are the beginnings of telecommunication.While electronic era of computer​ was The electronic age is wha we currently live in. It can be defined as the time between 1940 and right now. The ENIAC was the first high-speed, digital computer capable of being reprogrammed to solve a full range of computing problems.

I would prefer matlab code

Xc = (1.779 / 60) * 10^6 * ln D
Problem 3
Write a computer program in any language to calculate the shunt capacitive reactance spacing factor for spaces equal to 0, 1, 2... and 49 feet, and thus verify Table A.5.

Answers

MATLAB is a high-level programming language and environment commonly used for numerical computation, data analysis, and visualization. Here's an example of MATLAB code to calculate the shunt capacitive reactance spacing factor for various spacing values:

% Calculation of Shunt Capacitive Reactance Spacing Factor

% Constants

D = 2.5; % Diameter of conductor in inches

Xc = (1.779 / 60) * 10^6 * log(D); % Capacitive reactance per unit length

% Array to store spacing factors

spacing_factors = zeros(1, 50);

% Calculate spacing factors for spaces from 0 to 49 feet

for spacing = 0:49

   spacing_factors(spacing + 1) = exp(-2 * pi * spacing * Xc);

end

% Display the spacing factors

disp('Spacing Factors:');

disp(spacing_factors);

In this code, the variable D represents the diameter of the conductor in inches. The variable Xc represents the capacitive reactance per unit length calculated using the provided formula. The code uses a loop to calculate the spacing factors for spaces ranging from 0 to 49 feet and stores them in the spacing_factors array. Finally, the code displays the calculated spacing factors.

To know more about Programming Language visit:

https://brainly.com/question/31541969

#SPJ11

What are indexes, registries, and healthcare databases? what information is collected in them and how do we, or could we, use them?.

Answers

Healthcare facilities can store and access patient information using indexes and registers (also known as registries) for planning, research, and educational purposes.

What are indexes, registers, and healthcare databases?

Indexes serve as a pointer or indicator for finding information on ailments, doctors, and procedures/operations. Registry data is arranged chronologically and contains information on trauma and cancer. Databases are collections of arranged data saved in files of the binary type.

How to use the health care bases:

a collection of data fields used to store information on trauma patients cared for by a hospital. The trauma registry contains information that is recorded regarding incidence, diagnosis, treatment, and outcome.

Hence we can conclude that indexes and registries are used to store healthcare information

To know more on healthcare databases follow this link

https://brainly.com/question/27853630

#SPJ4

Other Questions
PLEASE ASAPWhich supranational organization refers refugees to the US Citizenship and Immigration Services for resettlement consideration?A) European UnionB) United NationsC) North Atlantic Treaty OrganizationD) Association of Southeast Asian Nations graph f(x)=|x+1|+3 then find the domain and range mainly looking at how id find the coordinates! the 2013 supreme court case shelby county v. holden invalidated the key accomplishments of the voting rights act of 1965, which led to a cascade of new state laws intended to limit the right to vote for poor people of all races. PLEASE HELP ASAP!!! MARKING BRAINLIEST!!Pretend that you are a person traveling on the Oregon Trail. As you have just learned, the journey was full of hardship and danger. Write at least 2 paragraphs describing an event you may have encountered. Include the following in your paragraph:1) Your name, town you are from, (my name is savannah, pick any town for me)2) # of people in your family, (4 people)3) when you left your state, (any date)4) when you arrived in Oregon, (any date)5) the event or incident that you and your family encountered, (any incident, event)where along the trail it occurred, and how you overcame it. LG Murphy and Co. ________________a.was a Supreme Court judge.b.was a supplier for 7 forts.c.discouraged army contracts.d.all of the above. Which pair of triangles can be proven congruent by SAS?2 triangles with identical angle measures are shown. The second triangle is shifted to the right.2 triangles are shown. They have 2 congruent sides and a congruent angle. The first triangle is rotated about a point to form the second triangle.2 triangles are shown. They have 1 congruent side and 2 congruent angles. The first triangle is rotated about a shared side to form the second triangle.2 right triangles are shown. They have 2 congruent sides and one congruent angle. The first triangle is reflected across the shared side to form the second triangle. What is the quotient of this division problem?69 + 7 = ?A. 9 r6B. 7 r5C. 8 r8D. 9 r3 Determine the number of unique triangles that can be made from the following information: For LMN, = 31, /LM = 6.9, and /MN = 3.4. The bold word is an adverb. Which verb does it describe?Simba ran downstairs when the doorbell rang.Submit answer How do you think peoples misconceptions about the causes of the Black Death affected the spread of disease? What happens in Chapter 19 of Tom Sawyer? he primary disadvantage that bilingual learners have relative to monolingual learners is in the domain of Which of the following are NOT examples of digital information storage?a) DVD'sb) magnetic hard drivesc) compact disksd) vinyl records Help meeeeeeee pleaseeeee What carries small amounts of nitrogenous waste away from the fetus? Which of the following is not an extinct species?A. Dodob. BisonC. Sikkim stagD. None of these the number of elementary and high school students who joined the math club may be expressed as 3 + 1. Evaluate 3 + 1.asap need solution pls The thick-walled inferior chambers of the heart that pump blood into the arteries are called ___A) vesselsB) ventriclesC) atriaD) auricles Toward whom, in The Grapes of Wrath, did Steinbeck have a sympathetictone?A. Migrant workersB. BankersC. Orchard ownersD. Gas station workers Brainliest if you can answer this without googleYour in a cement room with no windows or doors. The only thing you have is a mirror and a piece of wood. How do you get out?