1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
GREYUIT [131]
3 years ago
12

Consider the decision version of the Binary Search algorithm, which takes an array a of integers of size n, an integer x to be f

ound, and gives a boolean result. Which of the following statements corresponds to a pair of valid Pre- and Post-conditions?
Note: Assume issorted() implies ascending numeric order:______.
A) PRE:n > 1
POST: result == x E a A is Sorted (a)
B) PRE: True
POST:isSorted(a) An > 1 C) PRE:n > 1A is Sorted (a). 10 sxs a[n-1]
POST: result == x E a vissorted(a)
D) PRE:n 1 An == size (a) A is Sorted (a) A a [0] SX Sa(n-1)
POST: result == XE a
E) PRE:n > i^n -- size (a) ^ a[0] 5 x 5 a (n-1]
POST: result = X Ea
Computers and Technology
1 answer:
Marat540 [252]3 years ago
3 0

Answer:

B

Explanation:

I am not for sure

You might be interested in
What is the statement describing? Agile team continuously adapt to new circumstances and enhance the methods of value delivery
Vera_Pavlovna [14]

Answer:

Continuous Integration

Explanation:

In continuous integration process, A program or piece of code is edited, tested and validated by team of software developers or contributors to complete and deploy the single project. This practice will improve the quality and reliability of the code.

Improvement, delivery and deployment are the three different phases, to complete the process of continuous integration.The individuals who contribute in a code or program  in terms of improvement, delivery and deployment make a team that leads to continuous integration.

So, Agile team Continuously adapt Continuous Integration to new circumstances and enhance the methods of value delivery.

8 0
3 years ago
Write an if/else statement that assigns 0 to x when y is equal to 10; otherwise it should assign
Liono4ka [1.6K]

Answer:

if(y==10)

{

     x=0;   // assigning 0 to x if y equals 10.

}

else

{

   x=1;   // assigning 1 to x otherwise.

}

Explanation:

In the if statement i have used equal operator == which returns true if value to it's right is equal to value to it's left otherwise false.By using this operator checking value of y and if it is 10 assigning 0 to x and if it is false assigning 1 to x.

7 0
3 years ago
Select all that apply.
Valentin [98]

Answer:

1, 3, & 4.

Is the way to do so. Good luck.

6 0
3 years ago
You can set the margin using the rular also true or false​
Murljashka [212]

Answer:

true

Explanation:

7 0
3 years ago
Calculate the average high and low in python code for beginners pls
Nikolay [14]

Answer:

There are two ways to find the average of a list of numbers in Python. You can divide the sum() by the len() of a list of numbers to find the average. Or, you can find the average of a list using the Python mean() function

Explanation:

3 0
3 years ago
Other questions:
  • ________ is used to store programs and instructions that are automatically loaded when the computer is turned on.
    14·1 answer
  • Write a program that asks the user to enter a birth year. the program should then indicate which generation a person of that yea
    14·1 answer
  • Hot five was the famous band of which musician?
    14·1 answer
  • Stealing passwords by using software code to run through various password schemes with numbers, symbols, capital letters, and ch
    6·1 answer
  • A _______ is conducted to determine the adequacy of system controls, ensure compliance with established security policy and proc
    10·1 answer
  • Create a pseudocode program that asks students to enter a word. Call a function to compute the different ways in which the lette
    9·1 answer
  • Help me find the difference between these logos
    10·2 answers
  • Mark is flying to Atlanta. The flight is completely full with 200 passengers. Mark notices he dropped his ticket while grabbing
    15·1 answer
  • Select all of the reasons Windows 95 increased the popularity of Windows.
    12·1 answer
  • Based on the following quote from Leonardo Da Vinci, what would be his definition of a fine artist? “Principles for the Developm
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!