This gist will contain all the exercises from the book
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object Solution { | |
def solution(S: String): Int = { | |
val max = S.length / 2 | |
@scala.annotation.tailrec | |
def symmetryPoint(i: Int): Int = { | |
val left = S(i) | |
val right = S(S.length - 1 - i) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object Solution { | |
def solution(N: Int): Int = { | |
if (N < 1) sys.error(s"Invalid input: $N") | |
@scala.annotation.tailrec | |
def foo(i: Int, total: Int): (Int, Int) = { | |
if ((i * i) >= N) (total, i) | |
else if (N % i == 0) foo(i + 1, total + 2) | |
else foo(i + 1, total) | |
} |
Here you will find instructions for importing the datasets for M001: MongoDB Basics into a locally running MongoDB deployment.
All datasets are provided in Amazon S3 in a single zip file (243 MB zipped; 1.5 GB unzipped). The files were created with the mongodump command. They may be imported into your MongoDB deployment using mongorestore. Note that these datasets include the indexes necessary to support example queries and labs used in M001. The datasets included are as follows.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CONSOLE_RED="\033[2;31m" | |
CONSOLE_GREEN="\033[2;32m" | |
CONSOLE_CLEAR="\033[0m" | |
JENKINS_SERVER=http://my_jenkins_server | |
JOB=$1 | |
JOB_QUERY=/job/${JOB} |
NewerOlder