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
Vsevolod [243]
3 years ago
14

nancy is 5 years younger than her brother stan. last year she was half as old he was. how old is each of them now? PLS HELP

Mathematics
1 answer:
Zolol [24]3 years ago
6 0
Nancy is 6 and stan is 11
You might be interested in
What is the nature of the roots of 6x² - 22=0?​
PolarNik [594]

Answer:

x=√ 33 /3 , − √ 33 /3

Step-by-step explanation:

4 0
3 years ago
The ternary search algorithm locates an element in a list of increasing integers by successively splitting the list into three s
Zigmanuir [339]

Answer:

Algorithm

The steps involved in this algorithm are:

(The list must be in sorted order)

• Step 1: Divide the search space (initially, the list) in three parts (with two mid-points: mid1 and mid2)

• Step 2: The target element is compared with the edge elements that is elements at location mid1, mid2 and the end of the search space. If element matches, go to step 3 else predict in which section the target element lies. The search space is reduced to 1/3rd. If the element is not in the list, go to step 4 or to step 1.

• Step 3: Element found. Return index and exit.

• Step 4: Element not found. Exit.

Complexity

• Worst case time complexity: O(log N)

• Average case time complexity: O(log N)

• Best case time complexity: O(1)

• Space complexity: O(1)

Algorithm

The steps involved in this algorithm are:

(The list must be in sorted order)

• Step 1: Divide the search space (initially, the list) in three parts (with two mid-points: mid1 and mid2)

• Step 2: The target element is compared with the edge elements that is elements at location mid1, mid2 and the end of the search space. If element matches, go to step 3 else predict in which section the target element lies. The search space is reduced to 1/3rd. If the element is not in the list, go to step 4 or to step 1.

• Step 3: Element found. Return index and exit.

• Step 4: Element not found. Exit.

Complexity

• Worst case time complexity: O(log N)

• Average case time complexity: O(log N)

• Best case time complexity: O(1)

• Space complexity: O(1)

#include <stdio.h>

int ternarySearch(int array[], int left, int right, int x)

{

  if (right >= left) {

    int intvl = (right - left) / 3;

    int leftmid = left + intvl;

    int rightmid = leftmid + intvl;

    if (array[leftmid] == x)

       return leftmid;

    if (array[rightmid] == x)

       return rightmid;

    if (x < array[leftmid]) {

      return ternarySearch(array, left, leftmid, x);

    }

    else if (x > array[leftmid] && x < array[rightmid]) {

      return ternarySearch(array, leftmid, rightmid, x);

    }

    else {

      return ternarySearch(array, rightmid, right, x);

    }

  }

  return -1;

}

int main(void)

{

  int array[] = {1, 2, 3, 5};

  int size = sizeof(array)/ sizeof(array[0]);

  int find = 3;

  printf("Position of %d is %d\n", find, ternarySearch(array, 0, size-1, find));

  return 0;

}

Step-by-step explanation:

6 0
3 years ago
How are area and volume is alike
Jobisdone [24]

Answer:

Area is surface are while volume is how much space the object takes up.

Step-by-step explanation:

3 0
3 years ago
Read 2 more answers
Rick is on a bicycle trip. Every 4 days he bikes 230 km. If Rick keeps the same pace for 16 days, how many kilometers will he bi
Scorpion4ik [409]
That's easy just create a proportion
4 0
3 years ago
Read 2 more answers
What is the prime factor of 30?
nika2105 [10]

Answer:

3

Step-by-step explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • What is a ratio please help me
    13·2 answers
  • In a game, the two players scored a total of 121 points. One player had 13 more points than the other player. How many points di
    7·1 answer
  • A delivery person uses a service elevator to bring books up to an office the delivery person 160lb and each box of books weighs
    11·2 answers
  • Of the 50 states, 2/5 of the states starts with M A or N. How can you use equivalent fractions to find out how many states this
    13·2 answers
  • 519 divided by 6 and 915 divided by 7 and 439 divided by 7 and 812 divided by 9 which one does not have a two digit quotient.
    13·1 answer
  • Which expression can be used to find m
    14·1 answer
  • Asap will mark as brain if correct
    5·1 answer
  • Which relation is a function?
    9·2 answers
  • A picture frame (see figure) has a total perimeter of 3 feet. The width of the frame is 0.64 times its length. Find the dimensio
    11·1 answer
  • 8 Classes
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!