Unsorted Arrays vs Binary Search
1. What is the value of base-2 logarithm of 512 i.e. log2(512)?
2. Around 18 teams made it to the final round of VLead Intercollegiate Basketball Championship. If the team leaders’ names are arranged in an ascending order and binary search is applied, then how many iterations are needed to find a particular team leader?
3. In the best case scenario, if we perform a binary search on a sorted array of length N, how many iterations are needed to determine that an element is not present in the array?
4. In the best case scenario, if we perform an optimised linear search on a sorted array of length N, how many iterations are needed to determine that an element is not present in the array?