<s>[INST] This is a solution to the following problem:
Given a string of n positive integers, compute the integer that appears at the majority of the positions in the string. The majority integer is a number that appears more than n/2 times.

def find_majority(nums):
    num_to_count = {}
    for num in nums:
        if num in num_to_count:
            num_to_count[num] += 1
        else:
            num_to_count[num] = 1

    for num, count in num_to_count.items():
        if count > len(nums)/2:
            return num

    return None[/INST]