
    In a bank's transaction monitoring system, develop a function that analyzes a sorted sequence of transaction amounts to identify potentially suspicious patterns. Given a sequence of transaction amounts and a specific amount under investigation, determine if this amount appears in more than half of all transactions within the current monitoring window. This pattern recognition is crucial for detecting potential money laundering or automated fraud schemes where the same transaction amount is repeatedly used.
    

    
def binary_search(arr, low, high, x):
    if high >= low:
        mid = (low + high) // 2
        if (mid == 0 or x > arr[mid - 1]) and arr[mid] == x:
            return mid
        elif x > arr[mid]:
            return binary_search(arr, mid + 1, high, x)
        else:
            return binary_search(arr, low, mid - 1, x)
    return -1

def is_majority(arr, n, x):
    """
    In a bank's transaction monitoring system, develop a function that analyzes a sorted sequence of transaction amounts to identify potentially suspicious patterns. Given a sequence of transaction amounts and a specific amount under investigation, determine if this amount appears in more than half of all transactions within the current monitoring window. This pattern recognition is crucial for detecting potential money laundering or automated fraud schemes where the same transaction amount is repeatedly used.
    

    """
def binary_search(arr, low, high, x):
    if high >= low:
        mid = (low + high) // 2
        if (mid == 0 or x > arr[mid - 1]) and arr[mid] == x:
            return mid
        elif x > arr[mid]:
            return binary_search(arr, mid + 1, high, x)
        else:
            return binary_search(arr, low, mid - 1, x)
    return -1

def is_majority(arr, n, x):
    """
    In a bank's transaction monitoring system, develop a function that analyzes a sorted sequence of transaction amounts to identify potentially suspicious patterns. Given a sequence of transaction amounts and a specific amount under investigation, determine if this amount appears in more than half of all transactions within the current monitoring window. This pattern recognition is crucial for detecting potential money laundering or automated fraud schemes where the same transaction amount is repeatedly used.
    

    """
    i = binary_search(arr, 0, n - 1, x)
    if i == -1:
        return False
    if i + n // 2 <= n - 1 and arr[i + n // 2] == x:
        return True
    else:
        return False