We will find a way, we always have.

-interstellar

Problem Solving/리트코드 3

[LeetCode] 3036. Number of Subarrays That Match a Pattern II

🔈 문제 You are given a 0-indexed integer array nums of size n, and a 0-indexed integer array pattern of size m consisting of integers -1, 0, and 1. A subarray nums[i..j] of size m + 1 is said to match the pattern if the following conditions hold for each element pattern[k]: nums[i + k + 1] > nums[i + k] if pattern[k] == 1. nums[i + k + 1] == nums[i + k] if pattern[k] == 0. nums[i + k + 1] < nums[i..

[LeetCode] 1657. Determine if Two Strings Are Close

🔈 문제 Two strings are considered close if you can attain one from the other using the following operations: Operation 1: Swap any two existing characters.For example, abcde -> aecdb Operation 2: Transform every occurrence of one existing character into another existing character, and do the same with the other character. For example, aacabb -> bbcbaa (all a's turn into b's, and all b's turn into ..