Leetcode/Binary 5

[Leetcode 아주 상세한 문제풀이] 371. Sum of Two Integers - 코드 line 별 설명

Leetcode 문제 이번에 풀어볼 문제는 리트코드 371번 문제 Sum of Two Integers 다. 우선 문제를 살펴보자. 리트코드 371번 문제 Sum of Two Integers 링크 Sum of Two Integers - LeetCode Sum of Two Integers - LeetCode Can you solve this real interview question? Sum of Two Integers - Given two integers a and b, return the sum of the two integers without using the operators + and -. Example 1: Input: a = 1, b = 2 Output: 3 Example 2: Input: a ..

Leetcode/Binary 2023.12.26

[Leetcode 아주 상세한 문제풀이] 338. Counting Bits – 코드 line 별 설명

Leetcode 문제 이번에 풀어볼 문제는 리트코드 338번 문제 Counting Bits 이다. 우선 문제를 살펴보자. 리트코드 338번 문제 Counting Bits (링크) Counting Bits - LeetCode Counting Bits - LeetCode Can you solve this real interview question? Counting Bits - Given an integer n, return an array ans of length n + 1 such that for each i (0 0 1 --> 1 2 --> 10 Example 2: Input: n = 5 Output: [0,1,1,2,1,2] Explanation: 0 --> 0 1 --> 1 2 --> 10 3 -->..

Leetcode/Binary 2023.12.26

[Leetcode 아주 상세한 문제풀이] 268. Missing Number - 코드 line 별 설명

Leetcode 문제 이번에 풀어볼 문제는 리트코드 268번 문제 Missing Number 다. 우선 문제를 살펴보자. 리트코드 268번 문제 Missing Number 링크 Missing Number - LeetCode Missing Number - LeetCode Can you solve this real interview question? Missing Number - Given an array nums containing n distinct numbers in the range [0, n], return the only number in the range that is missing from the array. Example 1: Input: nums = [3,0,1] Output: 2 Expl..

Leetcode/Binary 2023.12.26

[Leetcode 아주 상세한 문제풀이] 191. Number of 1 Bits - 코드 line 별 설명

Leetcode 문제 이번에 풀어볼 문제는 리트코드 191번 문제 Number of 1 Bits 다. 우선 문제를 살펴보자. 리트코드 191번 문제 Number of 1 Bits 링크 Number of 1 Bits - LeetCode Number of 1 Bits - LeetCode Can you solve this real interview question? Number of 1 Bits - Write a function that takes the binary representation of an unsigned integer and returns the number of '1' bits it has (also known as the Hamming weight [http://en.wikipedia.or..

Leetcode/Binary 2023.12.26

[Leetcode 아주 상세한 문제풀이] 190. Reverse Bits - 코드 line 별 설명

Leetcode 문제 이번에 풀어볼 문제는 리트코드 190번 문제 Reverse bits 이다. 우선 문제를 살펴보자. 리트코드 190번 문제 Reverse bits Reverse Bits - LeetCode Reverse Bits - LeetCode Can you solve this real interview question? Reverse Bits - Reverse bits of a given 32 bits unsigned integer. Note: * Note that in some languages, such as Java, there is no unsigned integer type. In this case, both input and output will be given as a signed ..

Leetcode/Binary 2023.12.26