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
1. docs(guide): minor grammar fixes | |
2. doc(guide): Fix examples of $location.html5mode | |
3. doc(guide): Fixed typos at the unit tests guide | |
4. docs(ngMock.$httpBackend): fix variable declaration | |
5. docs(rootScope): correct code examples | |
6. docs($injector): clarify $inject property description | |
Section heading about `$inject` property refers to it as `$injector` property. | |
7. test(ngBindHtml): prevent variable name leak | |
Add "var" so element is local instead of global | |
8. docs($cookies): added example to $cookies api docs |
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 Main { | |
def solve(existDir: Set[String], createdDir: Set[String]): Int = { | |
def makeSubset(dir: Set[String]): Set[String] = { | |
dir.flatMap((c) => c.split("/").foldLeft(List[String]()) { (m: List[String], n: String) => m ++ Set((m.lastOption ++ List(n)).mkString("/")) }.toSet -- Set("")) | |
} | |
(makeSubset(createdDir) -- makeSubset(existDir)).size | |
} |
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
import java.io.PrintWriter | |
import scala.io.Source | |
import java.io.File | |
object Main { | |
val in = Source.fromFile("large.in").getLines | |
val printer = new PrintWriter(new File("large.out")) | |
def getMaxIdx(searchEngines: List[String], queries: List[String]): Int = { |
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
import java.io.PrintWriter | |
import scala.io.Source | |
import java.io.File | |
object Main { | |
val in = Source.fromFile("sample.in").getLines | |
val printer = new PrintWriter(new File("large.out")) | |
case class Box(count: BigInt, tp: BigInt) |
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
package crossTheMaze | |
import scala.io.Source | |
import java.io.File | |
import java.io.PrintWriter | |
object crossTheMazeMain { | |
sealed abstract class Direction { | |
def adj(x: Int, y: Int): List[(Int, Int, Direction)] | |
} |
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
import scala.io.Source | |
import java.io.PrintWriter | |
import java.io.File | |
object main { | |
val in = Source.fromFile("large.in").getLines | |
val printer = new PrintWriter(new File("large.out")) | |
val pre = "double triple quadruple quintuple sextuple septuple octuple nonuple decuple".split(" ").toList |