Update CountNumBinaryStrings

This commit is contained in:
Ritik2604
2020-05-25 03:17:26 +05:30
committed by GitHub
parent 94cfab0cfc
commit ec4f6a1110

View File

@ -1,3 +1,31 @@
package DynamicProgramming;
/*
* here is a important algo in this we have to count
* maximum no. of different binary strings which doesnot have
* consectuive 1s
Test Case:
int n=30;
startAlgo();
System.out.println(numStrIS(n));
System.out.println(endAlgo()+"ms");
startAlgo();
CountNumBinaryStr out=new CountNumBinaryStr();
System.out.println(out.numStrR(n).ans);
System.out.println(endAlgo()+"ms");
startAlgo();
System.out.println(countStrings(n,0));
System.out.println(endAlgo()+"ms");
*/
public class CountNumBinaryStr { public class CountNumBinaryStr {
public static long startTime; public static long startTime;
public static long endTime; public static long endTime;