Skip to content

Commit

Permalink
Day 7 Questions Added
Browse files Browse the repository at this point in the history
  • Loading branch information
Soumyakanta06 committed Sep 27, 2021
1 parent 8500499 commit bd6f38f
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Day 7/Problem Statement 7.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Himansh loves billiards very much. One day while playing a match , he found out a new trick in the game. He interpreted each red balls as 0 and each white balls as 1 .He started taking a note of the positions of white and red balls in the table. If there are at least 6 balls of same color placed one after another, then the situation is considered dangerous else its out of danger.

Input Description:-
- First line of input consists of t, the number of test cases
- Next t lines each consists of:
String: string consisting of 0 and 1

Input variables:
int t: No. of test cases
String : string comprising of 0 and 1

Output Description:
YES if the situation is dangerous
NO if the situation is out of danger

Constraints:
1<=t<=4
0<=value of each character<=1

Sample Input:
2
001001
1000000001

Sample Output:
NO
YES
16 changes: 16 additions & 0 deletions Day 7/input_7.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
15
10010000011111110101001001001101010111011
1101110100111111001000
000001
1000110110000001001011000111110001010110
0111100010111010001000
1111111
110100000100101010101110010000101001011000011
1011101101011011001000110111
1101000000011011000001010110010001000011100
1001111001100011
01111010100
10010110100110110
001111011110111100100100101011111000110100010
0111010010110001101000011010110000001101101101
010011011110101110

0 comments on commit bd6f38f

Please sign in to comment.