





def   a_    ( lowerCAmelCase_      :			str,	lowerCAmelCase_      :			bool = False	):

   if not isinstance(lowerCAmelCase_,	lowerCAmelCase_	):
      __lowerCAmelCase								=	F"""Expected string as input, found {type(lowerCAmelCase_	)}"""
      raise ValueError(lowerCAmelCase_	)
   if not isinstance(lowerCAmelCase_,	lowerCAmelCase_	):
      __lowerCAmelCase								=	F"""Expected boolean as use_pascal parameter, found {type(lowerCAmelCase_	)}"""
      raise ValueError(lowerCAmelCase_	)

   __lowerCAmelCase								=	input_str.split('_'	)

   __lowerCAmelCase								=	0 if use_pascal else 1

   __lowerCAmelCase								=	words[start_index:]

   __lowerCAmelCase								=	[word[0].upper() + word[1:] for word in words_to_capitalize]

   __lowerCAmelCase								=	'' if use_pascal else words[0]

   return "".join([initial_word, *capitalized_words]	)


if __name__ == "__main__":
     from doctest import testmod

     testmod()








from __future__ import annotations

import math

def   a_    ( lowerCAmelCase_      :			int,	lowerCAmelCase_      :			int,	lowerCAmelCase_      :			bool,	lowerCAmelCase_      :			list[int],	lowerCAmelCase_      :			float	):

   if depth < 0:
      raise ValueError('Depth cannot be less than 0'	)

   if len(lowerCAmelCase_	) == 0:
      raise ValueError('Scores cannot be empty'	)

   if depth == height:
      return scores[node_index]

   if is_max:
      return max(
          minimax(depth + 1,	node_index * 2,	lowerCAmelCase_,	lowerCAmelCase_,	lowerCAmelCase_	),	minimax(depth + 1,	node_index * 2 + 1,	lowerCAmelCase_,	lowerCAmelCase_,	lowerCAmelCase_	),	)

   return min(
       minimax(depth + 1,	node_index * 2,	lowerCAmelCase_,	lowerCAmelCase_,	lowerCAmelCase_	),	minimax(depth + 1,	node_index * 2 + 1,	lowerCAmelCase_,	lowerCAmelCase_,	lowerCAmelCase_	),	)

def   a_    ( ):
   __lowerCAmelCase								=	[90, 23, 6, 33, 21, 65, 123, 3_4423]
   __lowerCAmelCase								=	math.log(len(lowerCAmelCase_	),	2	)
   print('Optimal value : ',	end=''	)
   print(minimax(0,	0,	lowerCAmelCase_,	lowerCAmelCase_,	lowerCAmelCase_	)	)


if __name__ == "__main__":
     import doctest

     doctest.testmod()
     main()

