본문 바로가기

전체 글

(2344)
(C++) - LeetCode (easy) 804. Unique Morse Code Words https://leetcode.com/problems/unique-morse-code-words/description/
(C++) - LeetCode (easy) 796. Rotate String https://leetcode.com/problems/rotate-string/description/ Rotate String - LeetCode Can you solve this real interview question? Rotate String - Given two strings s and goal, return true if and only if s can become goal after some number of shifts on s. A shift on s consists of moving the leftmost character of s to the rightmost position. leetcode.com 전수조사 문제였습니다. 📕 풀이방법 📔 풀이과정 1. 왼쪽으로 x칸만큼 움직인 문자열..
(C++) - LeetCode (easy) 771. Jewels and Stones https://leetcode.com/problems/jewels-and-stones/ Jewels and Stones - LeetCode Can you solve this real interview question? Jewels and Stones - You're given strings jewels representing the types of stones that are jewels, and stones representing the stones you have. Each character in stones is a type of stone you have. You want to kno leetcode.com 자료구조를 이용한 전수조사 문제였습니다. 📕 풀이방법 📔 입력 및 초기화 보석의 종류를 O..
(C++) - LeetCode (easy) 766. Toeplitz Matrix https://leetcode.com/problems/toeplitz-matrix/description/ Toeplitz Matrix - LeetCode Can you solve this real interview question? Toeplitz Matrix - Given an m x n matrix, return true if the matrix is Toeplitz. Otherwise, return false. A matrix is Toeplitz if every diagonal from top-left to bottom-right has the same elements. Example 1: leetcode.com 구현 문제였습니다. 📕 풀이방법 📔 풀이과정 1. 화살표 방향으로 한 번씩 검사해서 ..
(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 문제였습니다. 📕 풀이방법 📔 풀이과정..