Algorithm (2139) 썸네일형 리스트형 (C++) - LeetCode (easy) 762. Prime Number of Set Bits in Binary Representation https://leetcode.com/problems/prime-number-of-set-bits-in-binary-representation/description/ Prime Number of Set Bits in Binary Representation - LeetCode Can you solve this real interview question? Prime Number of Set Bits in Binary Representation - Given two integers left and right, return the count of numbers in the inclusive range [left, right] having a prime number of set bits in their binar.. (C++) - LeetCode (easy) 748. Shortest Completing Word https://leetcode.com/problems/shortest-completing-word/description/ Shortest Completing Word - LeetCode Can you solve this real interview question? Shortest Completing Word - Given a string licensePlate and an array of strings words, find the shortest completing word in words. A completing word is a word that contains all the letters in licensePlate. Ignore leetcode.com 구현 문제였습니다. 📕 풀이방법 📔 풀이과정 .. (C++) - LeetCode (easy) 747. Largest Number At Least Twice of Others https://leetcode.com/problems/largest-number-at-least-twice-of-others/description/ Largest Number At Least Twice of Others - LeetCode Can you solve this real interview question? Largest Number At Least Twice of Others - You are given an integer array nums where the largest integer is unique. Determine whether the largest element in the array is at least twice as much as every other numbe leetcod.. (C++) - LeetCode (easy) 746. Min Cost Climbing Stairs https://leetcode.com/problems/min-cost-climbing-stairs/description/ Min Cost Climbing Stairs - LeetCode Can you solve this real interview question? Min Cost Climbing Stairs - You are given an integer array cost where cost[i] is the cost of ith step on a staircase. Once you pay the cost, you can either climb one or two steps. You can either start from the ste leetcode.com dp 문제였습니다. 📕 풀이방법 📔 풀이과정.. (C++) - LeetCode (easy) 744. Find Smallest Letter Greater Than Target https://leetcode.com/problems/find-smallest-letter-greater-than-target/description/ Find Smallest Letter Greater Than Target - LeetCode Can you solve this real interview question? Find Smallest Letter Greater Than Target - You are given an array of characters letters that is sorted in non-decreasing order, and a character target. There are at least two different characters in letters. Retu leetc.. (C++) - LeetCode (easy) 733. Flood Fill https://leetcode.com/problems/flood-fill/description/ Flood Fill - LeetCode Can you solve this real interview question? Flood Fill - An image is represented by an m x n integer grid image where image[i][j] represents the pixel value of the image. You are also given three integers sr, sc, and color. You should perform a flood fill leetcode.com graph 탐색 문제였습니다. 📕 풀이방법 📔 입력 및 초기화 4방향을 확인할 일차원 배열 dr.. (C++) - LeetCode (easy) 728. Self Dividing Numbers.cpp https://leetcode.com/problems/self-dividing-numbers/description/ 📕 풀이방법 📔 입력 및 초기화 정답변수 ans를 선언해줍니다. 📔 풀이과정 1.left ~ right까지 for loop를 수행합니다. 2. 현재 원소를 문자열로 변환해 각 digit에 대해 for loop를 수행합니다. 3. 0이거나 나누어떨어지지 않는다면 loop를 탈출해줍니다. 📕 Code 📔 C++ class Solution { public: vector selfDividingNumbers(int left, int right) { vector ans; for(int i = left; i (C++) - LeetCode (easy) 724. Find Pivot Index https://leetcode.com/problems/find-pivot-index/description/ Find Pivot Index - LeetCode Can you solve this real interview question? Find Pivot Index - Given an array of integers nums, calculate the pivot index of this array. The pivot index is the index where the sum of all the numbers strictly to the left of the index is equal to the sum of leetcode.com 누적합을 이용하는 문제였습니다. 📕 풀이방법 📔 입력 및 초기화 누적합을 .. 이전 1 ··· 65 66 67 68 69 70 71 ··· 268 다음