


'''simple docstring'''





from __future__ import annotations






class   __lowercase				:





      def __init__(		self						:					int					,       __lowerCamelCase						:					str					,       __lowerCamelCase						:					Union[str, Any]       )    ->   Dict:






         """simple docstring"""







         UpperCAmelCase							=     text, pattern
         UpperCAmelCase							=     len(snake_case_       ), len(snake_case_       )





      def        _lowercase				(		self						:					Tuple					,       __lowerCamelCase						:					Any       )    ->   List[Any]:






         """simple docstring"""







         for i in range(self.patLen - 1					,       -1					,       -1       ):
            if char == self.pattern[i]:
               return i
         return -1





      def        _lowercase				(		self						:					List[Any]					,       __lowerCamelCase						:					Optional[int]       )    ->   Any:






         """simple docstring"""







         for i in range(self.patLen - 1					,       -1					,       -1       ):
            if self.pattern[i] != self.text[current_pos + i]:
               return current_pos + i
         return -1





      def        _lowercase				(		self						:					Tuple       )    ->   int:






         """simple docstring"""







         UpperCAmelCase							=     []
         for i in range(self.textLen - self.patLen + 1       ):
            UpperCAmelCase							=     self.mismatch_in_text(snake_case_       )
            if mismatch_index == -1:
               positions.append(snake_case_       )
            else:
               UpperCAmelCase							=     self.match_in_pattern(self.text[mismatch_index]       )
               UpperCAmelCase							=     (
                   mismatch_index - match_index
               )  # shifting index lgtm [py/multiple-definition]
         return positions

__a     =			"""ABAABA"""
__a     =			"""AB"""
__a     =			BoyerMooreSearch(text, pattern)
__a     =			bms.bad_character_heuristic()

if len(positions) == 0:
 print("""No match found""")
else:
 print("""Pattern found in following positions: """)
 print(positions)







def   _UpperCamelCase				(						lowerCAmelCase_  ,						lowerCAmelCase_   )						->int:
   return int((input_a, input_a).count(0   ) == 0   )
def   _UpperCamelCase				(						)						->None:
   assert and_gate(0  ,						0   ) == 0
   assert and_gate(0  ,						1   ) == 0
   assert and_gate(1  ,						0   ) == 0
   assert and_gate(1  ,						1   ) == 1


if __name__ == "__main__":
 test_and_gate()
 print(and_gate(1, 0))
 print(and_gate(0, 0))
 print(and_gate(0, 1))
 print(and_gate(1, 1))



