목록전체 글 (31)
코딩 공부

[LeetCode] [Easy] 404. Sum of Left Leaves leetcode.com/problems/sum-of-left-leaves/ Sum of Left Leaves - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 왼쪽 리프 노드 합 구하기 이번 문제는 자료 구조를 배웠던 분이라면 쉽게 하실 수 있는 문제에요. 리프는 트리에 마지막 부분에 있는 곳이에요. 트리하면 대부분 제귀함수로 푸는 문제더라구요. 제귀함수가 막막할땐 기본 구성인 base ..

[LeetCode] [Easy] 1323. Maximum 69 Number leetcode.com/problems/maximum-69-number/ Maximum 69 Number - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 6, 9 바꿔서 가장 큰 수 만들기 6과 9로만 이루어진 수가 주어질 때 6이면 9로 9면 6으로 한번만 바꿀수 있는 최대값을 구하는 문제입니다. char 배열로 숫자를 넣어주고 for loop을 돌려 처음 6을 찾으면 9로 바꿔주고 ..

[LeetCode] [Easy] 1446. Consecutive Characters leetcode.com/problems/consecutive-characters/ Consecutive Characters - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 가장 많이 연속된 캐릭터 찾기 for loop을 돌면서 전 캐릭터와 같은지 비교하고 같으면 max 값을 업데이트해주면 끝 (다르면 초기화) 비교적 쉬웠던 문제였어요 ㅎㅎ