programmers

def isEmpty(stack): return (len(stack) == 0) def solution(board, moves): answer = 0 b_stack = {} stack = [] height = len(board) width = len(board[0]) for w in range(width): tmp = [] for h in range(height-1, -1, -1): if (board[h][w] == 0): break else: tmp.append(board[h][w]) b_stack[w+1] = tmp for m in moves: if (not isEmpty(b_stack[m])): item = b_stack[m].pop() if (not isEmpty(stack) and stack[-..
fladi
'programmers' 태그의 글 목록