문제풀이 62

[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

[Leetcode 아주 상세한 문제풀이] 1143. Longest Common Subsequence - 코드 line 별 설명

Leetcode 문제 이번에 풀어볼 문제는 리트코드 1143번 문제 Longest Common Subsequence 다. 우선 문제를 살펴보자. 리트코드 1143번 문제 Longest Common Subsequence 링크 Longest Common Subsequence - LeetCode Longest Common Subsequence - LeetCode Can you solve this real interview question? Longest Common Subsequence - Given two strings text1 and text2, return the length of their longest common subsequence. If there is no common subsequence,..

[Leetcode 아주 상세한 문제풀이] 322. Coin Change - 코드 line별 설명

Leetcode 문제 이번에 풀어볼 문제는 리트코드 322번 문제 Coin change 다. 우선 문제를 살펴보자. 리트코드 322번 문제 Coin change 링크 Coin Change - LeetCode Coin Change - LeetCode Can you solve this real interview question? Coin Change - You are given an integer array coins representing coins of different denominations and an integer amount representing a total amount of money. Return the fewest number of coins that you need to make le..

[Leetcode 아주 상세한 문제풀이] 300. Longest Increasing Subsequence – 코드 line 별 설명

Leetcode 문제 이번에 풀어볼 문제는 리트코드 300번 문제 Longest Increasing Subsequence 다. 우선 문제를 살펴보자. 리트코드 300번 문제 Longest Increasing Subsequence 링크 Longest Increasing Subsequence - LeetCode Longest Increasing Subsequence - LeetCode Can you solve this real interview question? Longest Increasing Subsequence - Given an integer array nums, return the length of the longest strictly increasing subsequence. Example 1: ..

[Leetcode 아주 상세한 문제풀이] 213. House Robber II – 코드 line 별 설명

Leetcode 문제 이번에 풀어볼 문제는 리트코드 213번 문제 House Robbert II 다. 우선 문제를 살펴보자. 리트코드 213번 문제 House Robbert II 링크 House Robber II - LeetCode House Robber II - LeetCode Can you solve this real interview question? House Robber II - You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed. All houses at this place are arranged in a circle. That mean..

[Leetcode 아주 상세한 문제풀이] 198. House Robber - 코드 line 별 설명

Leetcode 문제 이번에 풀어볼 문제는 리트코드 198번 문제 House Robber 다. 우선 문제를 살펴보자. 리트코드 198번 문제 House Robber 링크 House Robber - LeetCode House Robber - LeetCode Can you solve this real interview question? House Robber - You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent h..