ANSWER USING PYTHON
Assume you are given a sorted list and need to create a functionthat takes a value as input and returns how many times that valueoccurs in the list. You could accomplish this using a linear searchapproach that would take O(n) time. Instead, you can use a binarysearch approach to find the first index that the value occurs atand a second binary search to find the last index the value occursat. This will allow you to determine how many times the item occursin the list in O(log n) time. Write a program that has 3functions:
1. count(list, value) – returns
PayPal Gateway not configured
PayPal Gateway not configured