I hereby claim:
- I am billotei on github.
- I am alexte (https://keybase.io/alexte) on keybase.
- I have a public key ASBKq1zHLVchylFSQc6Pbkz-fMzyJ1lv43t3tRgdcDaFTwo
To claim this, I am signing this object:
def validate(n): | |
def process_1(index, nb, odd): | |
result = (nb * 2 if index % 2 else nb) if odd else (nb * 2 if 0 == index % 2 else nb) | |
return result - 9 if result > 9 else result | |
n = [int(i) for i in str(n)] | |
if len(n) % 2: | |
n = [process_1(index, nb, True) for index, nb in enumerate(n)] | |
else: | |
n = [process_1(index, nb, False) for index, nb in enumerate(n)] | |
return sum(n) % 10 == 0 |
package models | |
import dao.Dao | |
import com.avaje.ebean.annotation.CreatedTimestamp | |
import com.avaje.ebean.annotation.UpdatedTimestamp | |
import play.data.validation.Constraints | |
import javax.persistence._ |
I hereby claim:
To claim this, I am signing this object:
object Application extends App { | |
def quickSort(l: Array[Int], low: Int, high: Int): Unit = { | |
if (low < high) { | |
val pivotIdx = partition(l, low, high) | |
quickSort(l, low, pivotIdx - 1) | |
quickSort(l, pivotIdx + 1, high) | |
} | |
} |