online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
def max(a,b): if a>b: return a return b def keep(last, current, inp, map): # print last # print current # print map if len(inp) == 2 : if inp[0]==inp[1]: return 1 return 2 if current >= len(inp): return len(map) if current == last : map11 = map.copy() map11.add(inp[current:]) return keep(last, current + 1, inp, map11) map1 = map.copy(); if current != (len(inp)-1): map1.add(inp[last:current]) map2 = map.copy() return max(keep(last,current+1,inp, map2), keep(current, current+1, inp, map1)) print(keep(0,0,"121", set([]))) print(keep(0,0,"aaaaaaa", set([]))) print(keep(0,0,"aba", set([]))) print(keep(0,0,"aababaa", set([]))) print(keep(0,0,"21", set([]))) print(keep(0,0,"22", set([])))

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue