


'''simple docstring'''







from __future__ import annotations
class 	UpperCamelCase__					:



     """simple docstring"""






     def __init__( self      ,	snake_case__      ,	snake_case__   ):

            '''simple docstring'''

            _lowerCAmelCase			,     _lowerCAmelCase    :							Tuple   			=       text, pattern
            _lowerCAmelCase			,     _lowerCAmelCase    :							int   			=       len(snake_case__   ), len(snake_case__   )







     def a	( self      ,	snake_case__   ):

            '''simple docstring'''

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







     def a	( self      ,	snake_case__   ):

            '''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 a	( self   ):

            '''simple docstring'''

            _lowerCAmelCase    :							Tuple   			=       []
            for i in range(self.textLen - self.patLen + 1   ):
                   _lowerCAmelCase    :							Tuple   			=       self.mismatch_in_text(snake_case__   )
                   if mismatch_index == -1:
                          positions.append(snake_case__   )
                   else:
                          _lowerCAmelCase    :							Dict   			=       self.match_in_pattern(self.text[mismatch_index]   )
                          _lowerCAmelCase    :							List[str]   			=       (
                              mismatch_index - match_index
                          )  # shifting index lgtm [py/multiple-definition]
            return positions
lowerCAmelCase    :     str					=						"""ABAABA"""
lowerCAmelCase    :     Any					=						"""AB"""
lowerCAmelCase    :     Any					=						BoyerMooreSearch(text, pattern)
lowerCAmelCase    :     Optional[int]					=						bms.bad_character_heuristic()

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





'''simple docstring'''







from typing import Any






def 			lowercase				(_A					):







       """simple docstring"""







       if not input_list:
              return []
       _lowerCAmelCase    :							Optional[int]   			=       [input_list.count(_A					) for value in input_list]
       _lowerCAmelCase    :							int   			=       max(_A					)  # Gets the maximum count in the input list.
       # Gets values of modes
       return sorted({input_list[i] for i, value in enumerate(_A					) if value == y}					)


if __name__ == "__main__":
       import doctest

       doctest.testmod()

