목록2023/12 (57)
넘치게 채우기
https://leetcode.com/problems/largest-substring-between-two-equal-characters/description/ Largest Substring Between Two Equal Characters - LeetCode Can you solve this real interview question? Largest Substring Between Two Equal Characters - Given a string s, return the length of the longest substring between two equal characters, excluding the two characters. If there is no such substring return..
https://leetcode.com/problems/redistribute-characters-to-make-all-strings-equal/description/ Redistribute Characters to Make All Strings Equal - LeetCode Can you solve this real interview question? Redistribute Characters to Make All Strings Equal - You are given an array of strings words (0-indexed). In one operation, pick two distinct indices i and j, where words[i] is a non-empty string, and ..
https://leetcode.com/problems/minimum-difficulty-of-a-job-schedule/description/ Minimum Difficulty of a Job Schedule - LeetCode Can you solve this real interview question? Minimum Difficulty of a Job Schedule - You want to schedule a list of jobs in d days. Jobs are dependent (i.e To work on the ith job, you have to finish all the jobs j where 0
프로그래밍 언어에서 if문을 자주 이용하곤 한다. 아래의 코드에서 어떤 결과가 나올까? def funcA(): print("A") return False def funcB(): print("B") return True if funcA() and funcB(): print("참") else: print("거짓") A B 거짓 A 거짓 거짓 정답은 2번이다. and논리연산을 할 때, 앞의 오퍼랜드가 false인 경우, 뒤의 오퍼랜드를 확인하지 않는다. 이 방법을 통해서 더 간결하고 가독성이 좋은 코딩을 할 수 있다. 반대로, or의 경우도 그렇다. or논리연산을 할 때, 앞의 오퍼랜드가 true인 경우, 뒤의 오퍼랜드를 확인하지 않는다. 실제 사용 예시: 알고리즘 문제풀이에서 슬라이딩 윈도우를 구현할 때 L..
https://leetcode.com/problems/string-compression-ii/description/ leetcode - String Compression II 문제 유형 : 부분합, 다이나믹 프로그래밍, 재귀 문제 난이도 : Hard 문제 Run-length encoding is a string compression method that works by replacing consecutive identical characters (repeated 2 or more times) with the concatenation of the character and the number marking the count of the characters (length of the run). For exam..
https://leetcode.com/problems/minimum-time-to-make-rope-colorful/description/?envType=daily-question&envId=2023-12-27 Minimum Time to Make Rope Colorful - LeetCode Can you solve this real interview question? Minimum Time to Make Rope Colorful - Alice has n balloons arranged on a rope. You are given a 0-indexed string colors where colors[i] is the color of the ith balloon. Alice wants the rope to..
https://leetcode.com/problems/number-of-dice-rolls-with-target-sum/description/ Number of Dice Rolls With Target Sum - LeetCode Can you solve this real interview question? Number of Dice Rolls With Target Sum - You have n dice, and each die has k faces numbered from 1 to k. Given three integers n, k, and target, return the number of possible ways (out of the kn total ways) to roll leetcode.com l..
웹사이트 홍보하기 - 소셜 미디어 사이트 이해하기 사용자 상호 작용 및 공유를 기반으로 구축 된 사이트는 특정 콘텐츠에 관심을 가진 사용자와 이와 관련된 콘텐츠를 더 쉽게 이어준다. ❌이것만은 피하자) 신규 콘텐츠라면 아무리 사소한 것이라도 일일이 홍보하지 말고, 중요하고 흥미로운 콘텐츠 위주로만 홍보하자. 이러한 서비스에서 콘텐츠를 인위적으로 상단에 표시하기 위해 사이트에 편법을 사용하면 안 된다. - 사이트와 관련된 커뮤니티 사용자들에게 홍보 내 사이트와 비슷한 주제를 다루는 사이트와 소통하면 도움이 된다. 나만의 전문 영역이나 커뮤니티에서 화제가 되는 주제를 통해 콘텐츠와 관련된 추가 아이디어를 얻거나 커뮤니티 리소스를 마련할 수 있다. ❌이것만은 피하자) 내가 다루는 주제와 관련된 모든 사이트에 ..
https://leetcode.com/problems/decode-ways/description/ Decode Ways - LeetCode Can you solve this real interview question? Decode Ways - A message containing letters from A-Z can be encoded into numbers using the following mapping: 'A' -> "1" 'B' -> "2" ... 'Z' -> "26" To decode an encoded message, all the digits must be grouped then leetcode.com leetcode - Decode Ways 문제 유형 : 다이나믹 프로그래밍 문제 난이도 :..
https://leetcode.com/problems/climbing-stairs/description/ Climbing Stairs - LeetCode Can you solve this real interview question? 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 = 2 Outpu leetcode.com leetcode - Climbing Stairs 문제 유형 : 다이나믹 프로그래밍..