전체 글 (2344) 썸네일형 리스트형 (C++) - LeetCode (easy) 1018. Binary Prefix Divisible By 5 https://leetcode.com/problems/binary-prefix-divisible-by-5/description/ LeetCode - The World's Leading Online Programming Learning Platform 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 구현 문제였습니다. 📕 풀이방법 📔 입력 및 초기화 정답 ans와 현황 cur를 선언해준 후 적절히 초기화해줍니다. 📔 풀이과정 nums의 길이가 10^5(10만)이므로 매번 전체 십진.. (C++, Rust) - LeetCode (easy) 1013. Partition Array Into Three Parts With Equal Sum https://leetcode.com/problems/partition-array-into-three-parts-with-equal-sum/ LeetCode - The World's Leading Online Programming Learning Platform 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 간단 구현 문제였습니다. 📕 풀이방법 📔 풀이과정 1. 3등분으로 나눠지며 각 부분들은 전체 원소 합 / 3이 되어야 함을 생각하면 편합니다. 또한 부분들이 3등분을 초과하.. (C++, Rust) - LeetCode (easy) 1009. Complement of Base 10 Integer https://leetcode.com/problems/complement-of-base-10-integer/description/ LeetCode - The World's Leading Online Programming Learning Platform 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 bit masking으로 해결한 문제였습니다. 📕 풀이방법 📔 풀이과정 n을 인자로 n의 bit를 반전하는 함수 get bit mask를 수행합니다. 이 함수는 n보다 크거나 작으며 .. (C++) - LeetCode (easy) 1002. Find Common Characters https://leetcode.com/problems/find-common-characters/ LeetCode - The World's Leading Online Programming Learning Platform 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 문자열 다루는 문제였습니다. 📕 풀이방법 📔 입력 및 초기화 1. alphabat별 전체 words의 최소 빈도를 저장할 vector minFreq를 선언 후 각 값을 INT_MAX로 초기화해줍니다. 2. 정답 변수 .. (C++) - LeetCode (easy) 999. Available Captures for Rook https://leetcode.com/problems/available-captures-for-rook/description/ LeetCode - The World's Leading Online Programming Learning Platform 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 구현 문제였습니다. 📕 풀이방법 📔 입력 및 초기화 1. {행, 열}을 저장할 struct Coord를 선언합니다. 2. 정답변수 ans를 선언해줍니다. 📔 풀이과정 1. rook의 행,.. (C++) - LeetCode (easy) 1005. Maximize Sum Of Array After K Negations https://leetcode.com/problems/maximize-sum-of-array-after-k-negations/ LeetCode - The World's Leading Online Programming Learning Platform 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 greedy문제 였습니다. 📕 풀이방법 📔 풀이과정 원소 전체 합이 최대가 되려면 가장 작은 음수부터 최대한 flip해줘야합니다. 따라서 1. nums를 먼저 오름차순으로 정렬해줍니다.2.. (C++) - LeetCode (easy) 997. Find the Town Judge https://leetcode.com/problems/find-the-town-judge/description/ LeetCode - The World's Leading Online Programming Learning Platform 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 전수조사 문제였습니다. 📕 풀이방법 📔 입력 및 초기화 i번째 사람을 믿는 사람 수를 세기 위한 vector trusted와 i번째가 믿는 사람이 존재하는지 여부를 저장할 vector isTrust를 .. (C++) - LeetCode (easy) 993. Cousins in Binary Tree https://leetcode.com/problems/cousins-in-binary-tree/description/ LeetCode - The World's Leading Online Programming Learning Platform 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 자료구조 순회 문제였습니다. 📕 풀이방법 📔 입력 및 초기화 구조체 Info를 선언합니다. node의 깊이 depth와 부모정보 parent를 member 변수로 선언했습니다.x와 y의 정보를 저.. 이전 1 ··· 63 64 65 66 67 68 69 ··· 293 다음