-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scala version. #23
Scala version. #23
Conversation
def power(t: List[Int]): List[Int] = { | ||
@annotation.tailrec | ||
def pwr(@specialized t: List[Int], @specialized ps: List[Int]): List[Int] = { | ||
if (t.isEmpty) ps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or if ps
contains zero.
201705/rubenrua/README.txt
Outdated
2nd version | ||
------------ | ||
|
||
Array with 303 records: elapsed time = 1422ms |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isto é correcto? No peor caso posible? :-o
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No es el peor caso :(
Add a custom optimizated function to get generateAllSubArrays.
Pongamos a trabajar a la CPU para solucionar el peor caso posible. Me gustaría probarlo en un i7. |
Que boa pinta! Aproveitando que estou ca especialización de Coursera tentarei executalo no meu. |
|
¡36!. ¡Moi ben @rubenrua !. Xa vin que na segunda semán do primeiro curso hai un exercicio moi parecido (o de devolver o cambio), non sei se o resolviste así (recursivo con tail e head)... en calquera caso, 👏
A miña CPU: https://gist.github.com/antonmry/ef8ed8815ddf56fd590e5837b42be4b1 |
Ufff. Mi portátil se está quedando obsoleto. |
Scala collections are not spark collections
No description provided.