Question: 
Write a python function to find the maximum occurring character in a given string.


Model's Code:
def get_max_occuring_char(s):
    s = s.replace(" ", "")
    frequency = {}
    for char in s:
        frequency[char] = frequency.get(char, 0) + 1
    max_char = max(frequency, key=frequency.get)
    return max_char



Sample Correct Code:
def get_max_occuring_char(str1):
  ASCII_SIZE = 256
  ctr = [0] * ASCII_SIZE
  max = -1
  ch = ''
  for i in str1:
    ctr[ord(i)]+=1;
  for i in str1:
    if max < ctr[ord(i)]:
      max = ctr[ord(i)]
      ch = i
  return ch


Asserts:
assert get_max_occuring_char("data") == "a"
assert get_max_occuring_char("create") == "e"
assert get_max_occuring_char("brilliant girl") == "i"


Tests:
Test 1 of 3: PASS
Test 2 of 3: PASS
Test 3 of 3: PASS

Test 480 of 974: 354/480 (73.75%): success