<jupyter_start><jupyter_text>https://www.geeksforgeeks.org/maximum-consecutive-repeating-character-string/<jupyter_code>def func(st):
    max_count = 0
    max_val = st[0]
    i = 0
    n = len(st)
    while i < n:
        count = 1
        j = i+1
        while j < n and st[j] == st[i]:
            count += 1
            j += 1
        
        if count > max_count:
            max_count = count
            max_val = st[i]
        
        i = j
        
    return max_val
def func(st):
    n = len(st)
    count = 0
    res = st[0]
    curr_count = 1
    
    for i in range(n):
        if i+1 < n and st[i] == st[i+1]:
            curr_count += 1
        else:
            if curr_count > count:
                count = curr_count
                res = st[i]
            curr_count = 1
            
    return res
assert func('aaaabbaaccde') == 'a'
assert func('a') == 'a'
assert func('abbc') == 'b'<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12166488794023479, 'fraction_numerical': 0.014941302027748132, 'mean_word_length': 1.4363636363636363, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 7, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '366827', 'license': 'MIT', 'n_tokens_mistral': 346, 'n_tokens_neox': 333, 'n_words': 81, 'path': 'GeeksForGeeks/MaxConsecutiveRepeating.ipynb', 'repo_name': 'deepaksood619/Python-Competitive-Programming', 'size': '937'}