bitwise operator (2) 썸네일형 리스트형 [리트코드] Hamming Distance(python) 리트코드, Hamming Distance_해밍 거리 Hamming Distance - 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 TL;DR 비트 연산자(Bitwise operator) 문제 요약 1. '해밍 거리'는 두 숫자 사이의 비트 자릿수의 위치가 다른 개수를 의미한다. 2. 주어진 두 정수 x와 y 사이의 해밍 거리를 반환하는 함수를 작성하라. - 두 숫자를 이진수 형태로 바꾸고 자릿수 별로 비교해서 다른 숫자를 반환하는 함수를 작성하면 된다. - 같.. [리트코드] Single Number(python) 리트코드, Single Number_하나의 수(python) Single 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 TL;DR 비트연산자(Bitwise operator) 문제 요약 1. 하나의 수를 제외하고 두 개의 숫자들이 존재하는 nums에 대해서 단일한 숫자를 반환하는 함수를 작성하라. 2. 선형 시간 복잡도와 변수 하나의 공간 복잡도 내에 문제를 해결해야 한다. - 숫자가 원소로 있는 비어 있지 않은 리스트 nums에서 오직 하나만 있.. 이전 1 다음