We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94cfab0 commit ec4f6a1Copy full SHA for ec4f6a1
DynamicProgramming/CountNumBinaryStrings
@@ -1,3 +1,31 @@
1
+package DynamicProgramming;
2
+/*
3
+* here is a important algo in this we have to count
4
+* maximum no. of different binary strings which doesnot have
5
+* consectuive 1s
6
+
7
8
9
+Test Case:
10
11
+int n=30;
12
13
+ startAlgo();
14
+ System.out.println(numStrIS(n));
15
+ System.out.println(endAlgo()+"ms");
16
17
18
+ CountNumBinaryStr out=new CountNumBinaryStr();
19
+ System.out.println(out.numStrR(n).ans);
20
21
22
23
+ System.out.println(countStrings(n,0));
24
25
26
27
28
+*/
29
public class CountNumBinaryStr {
30
public static long startTime;
31
public static long endTime;
0 commit comments