[Easy] 1523. Count Odd Numbers in an Interval Range
leetCode 2022. 5. 26. 11:42

문제 Given two non-negative integers low and high. Return the count of odd numbers between low and high (inclusive). low부터 high까지 홀수가 몇 개인지 반환하는 문제이다. 예시 Example 1: Input: low = 3, high = 7 Output: 3 Explanation: The odd numbers between 3 and 7 are [3,5,7]. Example 2: Input: low = 8, high = 10 Output: 1 Explanation: The odd numbers between 8 and 10 are [9]. 제약 조건 Constraints: 0

[Easy] 1491. Average Salary Excluding the Minimum and Maximum Salary
leetCode 2022. 5. 26. 11:35

https://leetcode.com/problems/average-salary-excluding-the-minimum-and-maximum-salary/ Average Salary Excluding the Minimum and Maximum Salary - 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 문제 You are given an array of unique integers salary where salary[i] is the salary of the ..

[Easy] 136. Single Number
leetCode 2022. 5. 25. 12:06

https://leetcode.com/problems/single-number/ 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 문제 Given a non-empty array of integers nums, every element appears twice except for one. Find that single one. You must implement a solution with a linear runtime complexity..

[Easy] 190. Reverse Bits
leetCode 2022. 5. 25. 11:44

문제 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 integer type. They should not affect your implementation, as the integer's internal binary representation is the same, whether it is signed or unsigned. In Java, the compiler represents the signed in..

[Easy] 231. Power of Two
leetCode 2022. 5. 24. 11:58

문제 Given an integer n, return true if it is a power of two. Otherwise, return false. An integer n is a power of two, if there exists an integer x such that n == 2x. 예시 Example 1: Input: n = 1 Output: true Explanation: 20 = 1 Example 2: Input: n = 16 Output: true Explanation: 24 = 16 Example 3: Input: n = 3 Output: false 제약조건 Constraints: -231

[Easy] 191. Number of 1 Bits
leetCode 2022. 5. 24. 11:28

문제 Write a function that takes an unsigned integer and returns the number of '1' bits it has (also known as the Hamming weight). Note: Note that in some languages, such as Java, there is no unsigned integer type. In this case, the input will be given as a signed integer type. It should not affect your implementation, as the integer's internal binary representation is the same, whether it is sign..

[Medium] 784. Letter Case Permutation
leetCode 2022. 5. 19. 17:14

https://leetcode.com/problems/letter-case-permutation/ Letter Case Permutation - 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 문제 Given a string s, you can transform every letter individually to be lowercase or uppercase to create another string. Return a list of all possible str..

[Medium] 46. Permutations
leetCode 2022. 5. 19. 14:26

문제 Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order. 예시 Example 1: Input: nums = [1,2,3] Output: [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]] Example 2: Input: nums = [0,1] Output: [[0,1],[1,0]] Example 3: Input: nums = [1] Output: [[1]] 제약 조건 Constraints: 1