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
stich3 [128]
3 years ago
6

What would the coordinates be of a 1x1x1 cube in a 3D space if the front lower-left corner is placed at (0,0,0) and the back top

-right corner is placed at (1,1,1)?
Computers and Technology
1 answer:
NeTakaya3 years ago
6 0

Answer:

See picture.

Explanation:

The picture shows all the 8 coordinates.

You might be interested in
You are asked to simulate a binary search algorithm on an array of random values.An array is the list of similar type of element
Alex Ar [27]

Answer:

Explanation:

Problem statement:

to simulate a binary search algorithm on an array of random values.

Binary Search: Search a sorted array by repeatedly dividing the search interval in half. Begin with an interval covering the whole array. If the value of the search key is less than the item in the middle of the interval, narrow the interval to the lower half. Otherwise narrow it to the upper half. Repeatedly check until the value is found or the interval is empty.

Input/output description

Input:

Size of array: 4

Enter array:10  20 30 40

Enter element to be searched:40

The Output will look like this:

Element is present at index 3

Algorithm and Flowchart:

We basically ignore half of the elements just after one comparison.

Compare x with the middle element.

If x matches with middle element, we return the mid index.

Else If x is greater than the mid element, then x can only lie in right half subarray after the mid element. So we recur for right half.

Else (x is smaller) recur for the left half.

The Flowchart can be seen in the first attached image below:

Program listing:

// C++ program to implement recursive Binary Search

#include <bits/stdc++.h>

using namespace std;

// A recursive binary search function. It returns

// location of x in given array arr[l..r] is present,

// otherwise -1

int binarySearch(int arr[], int l, int r, int x)

{

   if (r >= l) {

       int mid = l + (r - l) / 2;

       // If the element is present at the middle

       // itself

       if (arr[mid] == x)

           return mid;

       // If element is smaller than mid, then

       // it can only be present in left subarray

       if (arr[mid] > x)

           return binarySearch(arr, l, mid - 1, x);

       // Else the element can only be present

       // in right subarray

       return binarySearch(arr, mid + 1, r, x);

   }

   // We reach here when element is not

   // present in array

   return -1;

}

int main(void)

{ int n,x;

cout<<"Size of array:\n";

cin >> n;

int arr[n];

cout<<"Enter array:\n";

for (int i = 0; i < n; ++i)

{ cin >> arr[i]; }

cout<<"Enter element to be searched:\n";

cin>>x;

int result = binarySearch(arr, 0, n - 1, x);

   (result == -1) ? cout << "Element is not present in array"

                  : cout << "Element is present at index " << result;

   return 0;

}

The Sample test run of the program can be seen in the second attached image below.

Time(sec) :

0

Memory(MB) :

3.3752604177856

The Output:

Size of array:4

Enter array:10  20 30 40

Enter element to be searched:40

Element is present at index 3

Conclusions:

Time Complexity:

The time complexity of Binary Search can be written as

T(n) = T(n/2) + c  

The above recurrence can be solved either using Recurrence T ree method or Master method. It falls in case II of Master Method and solution of the recurrence is Theta(Logn).

Auxiliary Space: O(1) in case of iterative implementation. In case of recursive implementation, O(Logn) recursion call stack space.

8 0
3 years ago
What are procedures that help keep a data base current
Veseljchak [2.6K]

File maintenance supports adding, modifying, or deleting records, as well as creating backup copies of the database

5 0
3 years ago
Read 2 more answers
What would you enter at the command prompt to start a new bourne again shell session?
butalik [34]

The answer is bash . The bash command opens a Bourne-again sheel (bash) session. It is the standard shell used in most Linux computers and it uses commands similar to a UNIX shell. Bash includes features such as:

1) Command completion when pressing the tab key.

2) Command history.

3) Improved arithmetic functions.

6 0
3 years ago
Becca is working on a program that will store data. The program will need quick access to data and data persistence is not impor
tester [92]

Answer:

A developer wants to take existing code written by another person and add some features specific to their needs.

Explanation:

pls Mark as Brain list

3 0
3 years ago
For a biology presentation, Sofia wants to summarize the various body systems and their key functions. Which element can she use
harkovskaia [24]
I still say its table and bullet lst

7 0
3 years ago
Read 2 more answers
Other questions:
  • Write a sequence of statements that create a file named "greeting" and write a single line consisting of "Hello, World!" to that
    5·1 answer
  • The condition, ____, entered in the criteria row of a long text field in a query window would retrieve all records where the lon
    8·1 answer
  • The unique global address for a web page or other resource on the internet is called the ________.
    7·1 answer
  • Which actions did Sheila have to take to make the changes observed? Check all that apply.
    9·1 answer
  • What is an example of the most important role of a systems analyst in any corporation?
    10·1 answer
  • In a distributed database system, the data placement alternative with the highest reliability and availability is Group of answe
    9·1 answer
  • . It has been said that technology will be the end of management. Maybe. How about artificial intelligence
    9·1 answer
  • 3.1.2 Quiz: What Can Information Technology Do for You? Question 8 of 10 What is one reason why a business may want to move enti
    7·1 answer
  • A _ is the acknowledgment of a potential noncomformity, or an opinion regarding an issue that is not covered by a standard
    6·1 answer
  • Which layer of the OSI model provides a user interface in the form of an entry point for programs to access the network infrastr
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!