전체에 해당하는 글 293

  1. [LeetCode] Number of 1 Bits 2025.12.18

    https://leetcode.com/problems/number-of-1-bits/description/Given a positive integer n, write a function that returns the number of set bits in its binary representation (also known as the Hamming weight). Example 1:Input: n = 11Output: 3Explanation:The input binary string 1011 has a total of three set bits.Example 2:Input: n = 128Output: 1Explanation:The input binary string 10000000 has a total ..


  2. [LeetCode] Valid Palindrome 2025.12.15

    https://leetcode.com/problems/valid-palindrome/description/ A phrase is a palindrome if, after converting all uppercase letters into lowercase letters and removing all non-alphanumeric characters, it reads the same forward and backward. Alphanumeric characters include letters and numbers.Given a string s, return true if it is a palindrome, or false otherwise. Example 1:Input: s = "A man, a plan,..


  3. [LeetCode] 3Sum 2025.12.04

    https://leetcode.com/problems/3sum/description/ Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0.Notice that the solution set must not contain duplicate triplets. Example 1:Input: nums = [-1,0,1,2,-1,-4]Output: [[-1,-1,2],[-1,0,1]]Explanation: nums[0] + nums[1] + nums[2] = (-1) + 0 + 1 = 0...


  4. [LeetCode] Climbing Stairs 2025.11.26

    https://leetcode.com/problems/climbing-stairs/You are climbing a staircase. It takes n steps to reach the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top? Example 1:Input: n = 2Output: 2Explanation: There are two ways to climb to the top.1. 1 step + 1 step2. 2 steps Example 2:Input: n = 3Output: 3Explanation: There are three ways to climb to th..


  5. [LeetCode] Valid Anagram 2025.11.24

    https://leetcode.com/problems/valid-anagram/description/ Given two strings s and t, return true if t is an anagram of s, and false otherwise. Example 1:Input: s = "anagram", t = "nagaram"Output: trueExample 2:Input: s = "rat", t = "car"Output: false Constraints:1 s and t consist of lowercase English letters.The problem was to check whether two given strings contain the same kinds of characters i..


  6. [LeetCode] Longest Consecutive Sequence 2025.11.21

    https://leetcode.com/problems/longest-consecutive-sequence/description/Given an unsorted array of integers nums, return the length of the longest consecutive elements sequence.You must write an algorithm that runs in O(n) time. Example 1:Input: nums = [100,4,200,1,3,2]Output: 4Explanation: The longest consecutive elements sequence is [1, 2, 3, 4]. Therefore its length is 4.Example 2:Input: nums ..


  7. [LeetCode] Top K Frequent Elements 2025.11.21

    https://leetcode.com/problems/top-k-frequent-elements/description/Given an integer array nums and an integer k, return the k most frequent elements.You may return the answer in any order. Example 1:Input: nums = [1,1,1,2,2,3], k = 2Output: [1,2] Example 2:Input: nums = [1], k = 1Output: [1] Example 3:Input: nums = [1,2,1,2,1,2,3,1,3,2], k = 2Output: [1,2] Constraints:1 -10^4 k is in the range [1..


  8. [LeetCode] contains Duplicate 2025.11.19

    https://leetcode.com/problems/contains-duplicate/description/ Given an integer array nums, return true if any value appears at least twice in the array, and return false if every element is distinct. Example 1:Input: nums = [1,2,3,1]Output: trueExplanation:The element 1 occurs at the indices 0 and 3. Example 2:Input: nums = [1,2,3,4]Output: falseExplanation:All elements are distinct. Example 3:I..


  9. Let’s Encrypt & Certbot for Automatic Certificate Renewal + Docker 2025.09.02

    English version is on Medium. nginx, Linux(Ubuntu 22.04), docker 환경 기준으로 작성된 글입니다. Let's encrypt?무료로 SSL/TLS 인증서를 발급해 주는 공인 인증 기관(Certificate Authority, CA)이다.발급은 ACME(Automatic Certificate Management Environment) 프로토콜을 통해 이루어진다.ACME 프로토콜은 SSL/TLS 인증서 발급 및 갱신을 자동화하기 위해 만들어진 표준 프로토콜이다.Let's encrypt와 ISRG(Internet Security Research Group)가 주도하여 표준화했다.복잡하고 수동적인 인증서 발급 및 갱신을 자동화하여 HTTPS 보급을 쉽게 하도록 ..


  10. Characters, Symbols and the Unicode Miracle 2025.08.15

    영어공부 겸 코딩 유튜브 해석~ UTF-8 is perhaps the best hack, the best single thing that's used that can be written down on the back of a napkin, and that's how was it was put together. The first draft of UTF-8 was written on the back of a napkin in a diner and it's just such an elegant hack that solved so many problems and I absolutely love it. UTF-8은 간단하지만 강력한 문자 인코딩 방식으로, 처음 초안은 식당에서 냅킨에 적혔다고 전해진다. 이 ..