a)
i)
Search1: Best case for linear search is O(1) as provided so search1 will take O(1) time
Search2: Seacrh2 will first sort number which takes O(nlogn) in all cases as provided, and binary search takes O(logn) in all cases.
So best case time will be O(nlogn) + O(logn) = O(nlogn)
Search 1 will be better for best case as it takes less time.
b) worst case
Search1: Linear searchs wost case is O(n) so worst case time of Search 1 is O(n)
Search2: Seacrh2 will first sort number which takes O(nlogn) in all cases as provided, and binary search takes O(logn) in all cases., so worst case time will be O(nlogn)
Search1 is better than Search2 as it takes less time in worst case.
llican chat lor sorted lin of las dy, ...,a, and Ka knEr z. Issarytkard.z, an-。。,a, 》...
the date is 4/09/19 POST-LABORATORY QUESTIONS (For full credit show your calculations). us T able enced color of light and the coresponding wavelength (om) associated with each cation Barium, Ba2 Copper, Cu2 Sodium, Na Calcium, Ca2 Potassium, K Strontium, Sr2 2. Calculate the energy associated with the light emitted by each of the K', Ca*2 and Li. Ca 2 Ba*2 s Flame Tests & Electron Configuration FLAME TESTS & ELECTRON CONFIGURATION INTRODUCTION AND BACKGROUND The chemistry of an element strongly...