Leetcode 2486. Append Characters to String to Make SubsequenceIntuition Get the length of the subsequence (if any) and subtract it from the length of t to find out how many characters we have to append (if any) Approach Keep a count of the length of the subsequence while iterating through s and then subtract th...Jun 3, 2024·1 min read
Leetcode 566. Reshape the MatrixApproach First check to make sure there's enough elements in the original matrix to meet the new row and column requirements. I did this by creating a new list to store all of the original values (which we will then use later to fill the new matrix) ...Feb 25, 2024·2 min read
Leetcode 1929. Concatenation of ArrayIntuition Loop through input array and fill answer array in one pass. Approach In one forloop set the ans[i] and ans[i + nums.Length]to the current value at nums[i]. Code public class Solution { public int[] GetConcatenation(int[] nums) { ...Jan 7, 2024·1 min read
First Open Source CommitToday is a big day, I submitted my first accepted open source commit! It was a small change, but a I'll take it! So the application is a custom file browser to replace the built in one for Windows. The issue was that whenever you used the hotkey to o...Nov 13, 2023·1 min read