Created
November 17, 2014 14:51
-
-
Save tamizhgeek/827ffaaf3e6856ec6bad to your computer and use it in GitHub Desktop.
This file contains 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 assignments.Lattice | |
import org.scalatest.{FlatSpec, ShouldMatchers} | |
class LatticePathFinderTest extends FlatSpec with ShouldMatchers{ | |
it should "find the lattice path correctly using memoization" in { | |
new Lattice(2).findNoOfPathsTrivialWay shouldBe 6 | |
new Lattice(4).findNoOfPathsTrivialWay shouldBe 56 | |
//new Lattice(20).findNoOfPathsTrivialWay shouldBe BigInt(2311801440) | |
} | |
it should "find the lattice path correctly using pascals method" in { | |
new Lattice(2).findNoOfPathsPascalsWay shouldBe 6 | |
new Lattice(4).findNoOfPathsPascalsWay shouldBe 56 | |
//new Lattice(20).findNoOfPathsPascalsWay shouldBe BigInt(2311801440) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment