<garvit244>388_1.py
def lengthLongestPath( input):
    if not input:
        return 0
    directories = input.split('\n')
    stack = [[-1, 0]] 
    result = 0
    for direct in directories:
        n_tabs = direct.count('\t')
        while stack and stack[-1][0] >= n_tabs:
            stack.pop()
        if "." in direct:
            result = max(result, stack[-1][1] + len(direct)-n_tabs)
        stack.append([n_tabs, stack[-1][1] + len(direct) + 1 -n_tabs])
    return result
def sample_funcname ( var_0 ) :
    if not var_0 :
        return 0
    var_4 = var_0.split ( '\n' )
    var_6 = [ [ - 1 , 0 ] ]
    var_7 = 0
    for var_8 in var_4 :
        var_11 = var_8.count ( '\t' )
        while var_6 and var_6 [ - 1 ] [ 0 ] >= var_11 :
            var_6.pop ( )
        if "." in var_8 :
            var_7 = max ( var_7 , var_6 [ - 1 ] [ 1 ] + len ( var_8 ) - var_11 )
        var_6.append ( [ var_11 , var_6 [ - 1 ] [ 1 ] + len ( var_8 ) + 1 - var_11 ] )
    return var_7
