[프로그래머스] 숫자게임

yewon Lee·2023년 6월 13일
0


😎코딩테스트 연습>Summer/Winter Coding(~2018)>숫자 게임


📘 문제풀이

def solution(A, B):
    result = 0
    
    A.sort()
    B.sort()
    
    for i in range(len(A)):
        for j in range(len(B)):
            if A[i] < B[j]:
                result += 1
                B.pop(j)
                break
                                   
    return result

효율성이 그닥 좋지는 않은 느낌..
profile
시작

0개의 댓글