Hi please help me figure out what’s wrong with this code.ASAP!!I got this array [[‘raa’, ‘aar’], [‘arr’, ‘arr’], [‘rar’, ‘arr’],[‘gh’, ‘gh’], [‘jk’, ‘jk’]] as u can see the second word(key) ineach list of list is sorted by alphabetical order.E.g.’aar’,’arr’,’arr’,’gh’,’jk’. I want to write a code that givena string say ‘arr’ and array length finds the first and last indexwhere ‘arr’ (the key)occurs.The correct output is 1 and 2.We haveto use binary search for O(logN) complexity. My code can return thefirst index correctly but for the last index it returns an errorlocal variable ‘mid’ referenced before assignment?WordValue justadds up the ascii
PayPal Gateway not configured
PayPal Gateway not configured