Ternary Search
# Q13. Write A Python Program To Maintain Club Members, Sort On Roll Numbers InAscending Order. # Write Function 'Ternary Search' To Search whether A Particular Student Is AMember Of Club Or Not. # Ternary Search Is Modified Binary Search That Divides Array Into 3 HalvesInstead Of 2. # Ternary Search arr = [] def TakeInput (): num = int ( input ( "Enter The Number Of Students \n " )) for i in range (num): students = int ( input ( f"Enter The Roll No Of Student { i + 1 }\n " )) arr.append(students) print ( " \n Array Of Total Students =" , arr, " \n " ) def bubbleSort (array): n = len (array) print ( " \n Unsorted Array Of Total Students =" , arr) flag = 0 for i in range (n): for j in range (n - i - 1 ): if array[j] > array[j + 1 ]: array[j], array[j + 1 ] = array[j + 1 ], array[j] flag = 1 if flag == 0 : ...