Skip to main content
deleted 520 characters in body
Source Link

Is it a doubling sequence?

A doubling sequence is an array of numbers where each subsequent number is at least twice the previous number.

Given a pre-sorted list of numbers, determine if the numbers in the list (\$n_{x}\$) have the property that Posted here:

\$n_1 \times 2 \le n_2\$

\$n_2 \times 2 \le n_3\ ...\$

and so on until reaching the end of the list.

#Input

A list of two or more numbers.

#Output

Any distinct True or False value.

#Examples:Is it a doubling sequence?

[10,20,30] > False [10,20,40] > True [1,2,3] > False [1,2,4] > True [1,2,10] > True [1,1] > False [10,1] > False 

Is it a doubling sequence?

A doubling sequence is an array of numbers where each subsequent number is at least twice the previous number.

Given a pre-sorted list of numbers, determine if the numbers in the list (\$n_{x}\$) have the property that:

\$n_1 \times 2 \le n_2\$

\$n_2 \times 2 \le n_3\ ...\$

and so on until reaching the end of the list.

#Input

A list of two or more numbers.

#Output

Any distinct True or False value.

#Examples:

[10,20,30] > False [10,20,40] > True [1,2,3] > False [1,2,4] > True [1,2,10] > True [1,1] > False [10,1] > False 

Is it a doubling sequence?

Posted here:

Is it a doubling sequence?

added 12 characters in body
Source Link

Is it a doubling sequence?

A doubling sequence is an array of numbers where each subsequent number is at least twice the previous number.

Given a pre-sorted list of numbers, determine if the numbers in the list (\$n_{x}\$) have the property that:

\$n_1 \times 2 \le n_2\$

\$n_2 \times 2 \le n_3\ ...\$

and so on until reaching the end of the list.

#Input

A list of two or more numbers.

#Output

Any distinct True or False value.

#Examples:

[10,20,30] > False [10,20,40] > True [1,2,3] > False [1,2,4] > True [1,2,10] > True [1,1] > False [10,1] > False 

Is it a doubling sequence?

A doubling sequence is an array of numbers where each subsequent number is at least twice the previous number.

Given a pre-sorted list of numbers, determine if the numbers in the list (\$n_{x}\$) have the property that:

\$n_1 \times 2 \le n_2\$

\$n_2 \times 2 \le n_3\ ...\$

and so on until reaching the end of the list.

#Input

A list of numbers.

#Output

Any distinct True or False value.

#Examples:

[10,20,30] > False [10,20,40] > True [1,2,3] > False [1,2,4] > True [1,2,10] > True [1,1] > False [10,1] > False 

Is it a doubling sequence?

A doubling sequence is an array of numbers where each subsequent number is at least twice the previous number.

Given a pre-sorted list of numbers, determine if the numbers in the list (\$n_{x}\$) have the property that:

\$n_1 \times 2 \le n_2\$

\$n_2 \times 2 \le n_3\ ...\$

and so on until reaching the end of the list.

#Input

A list of two or more numbers.

#Output

Any distinct True or False value.

#Examples:

[10,20,30] > False [10,20,40] > True [1,2,3] > False [1,2,4] > True [1,2,10] > True [1,1] > False [10,1] > False 
fix math
Source Link
Adám
  • 31.8k
  • 45
  • 77

Is it a doubling sequence?

A doubling sequence is an array of numbers where each subsequent number is at least twice the previous number.

Given a pre-sorted list of numbers, determine if the numbers in the list (\$n_{x}\$) have the property that:

\$n_1 \times 2 <= n_2\$\$n_1 \times 2 \le n_2\$

\$n_2 \times 2 <= n_3\ ...\$\$n_2 \times 2 \le n_3\ ...\$

and so on until reaching the end of the list.

#Input

A list of numbers.

#Output

Any distinct True or False value.

#Examples:

[10,20,30] > False [10,20,40] > True [1,2,3] > False [1,2,4] > True [1,2,10] > True [1,1] > False [10,1] > False 

Is it a doubling sequence?

A doubling sequence is an array of numbers where each subsequent number is at least twice the previous number.

Given a pre-sorted list of numbers, determine if the numbers in the list (\$n_{x}\$) have the property that:

\$n_1 \times 2 <= n_2\$

\$n_2 \times 2 <= n_3\ ...\$

and so on until reaching the end of the list.

#Input

A list of numbers.

#Output

Any distinct True or False value.

#Examples:

[10,20,30] > False [10,20,40] > True [1,2,3] > False [1,2,4] > True [1,2,10] > True [1,1] > False [10,1] > False 

Is it a doubling sequence?

A doubling sequence is an array of numbers where each subsequent number is at least twice the previous number.

Given a pre-sorted list of numbers, determine if the numbers in the list (\$n_{x}\$) have the property that:

\$n_1 \times 2 \le n_2\$

\$n_2 \times 2 \le n_3\ ...\$

and so on until reaching the end of the list.

#Input

A list of numbers.

#Output

Any distinct True or False value.

#Examples:

[10,20,30] > False [10,20,40] > True [1,2,3] > False [1,2,4] > True [1,2,10] > True [1,1] > False [10,1] > False 
Source Link
Loading