Exemplo n.º 1
0
    static void Main(string[] args)
    {
        testSubTrees();
        // Call numberOfWays() with test cases here
        string S = "facebook";

        Console.WriteLine(EncryptedWords.findEncryptedWord(S));
        int[] arr = { 5, 5, 6, 2, 1, 7, 8, 3 };//2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 };
        int   k   = 4;

        Console.WriteLine(String.Format("{0} n of ways", PairSums.numberOfWays(arr, k)));
        string toCipher = "<yzf-k_x+!a";

        // Console.WriteLine(RotationalCipher.rotationalCipher(toCipher, 3));
        int[] restuls = LargestTripleProducts.findMaxProduct(arr);
        Array.ForEach(restuls, Console.WriteLine);
    }
 public void FindEncryptedWord_Sample_MatchExpectation(string s, string r)
 {
     EncryptedWords.FindEncryptedWord(s).Should().Be(r);
 }