Saurav Maheshwarixauravww.hashnode.dev·Apr 19, 2024Remove Duplicates in Sorted Array- Easy Leetcode Solution using TypeScriptUnderstanding the 'Remove Duplicates from Sorted Array' Problem The task is to remove duplicates from a sorted array of numbers and return the new length of the array without duplicates Problem Type- Easy https://leetcode.com/problems/remove-duplicat...DiscussData Structures and AlgorithmsDSA
Saurav Maheshwarixauravww.hashnode.dev·Apr 19, 2024Remove Elements - Easy Leetcode Solution using TypeScriptUnderstanding the 'Remove Element' Problem The 'Remove Element' problem asks us to remove all occurrences of a specific number, val, from an array of numbers, nums. Problem Type- Easy https://leetcode.com/problems/remove-element/description/ O(n) Sol...DiscussData Structures and Algorithmsleetcode-solution
Sean Coughlinblog.seancoughlin.me·Apr 19, 2024Getting Started with Studying for Software Engineering Interviews Using LeetCodeSoftware engineering interviews can be daunting, especially when they involve algorithmic questions which are a staple at many top tech companies. This blog post will guide you through getting started with your interview preparation using LeetCode, a...DiscussSWE Interview Preparationleetcode
Kenny Carnealblog.kennycarneal.com·Apr 5, 2024Leetcode 1544. Make String GreatIntuition Use two pointers to iterate through the string checking each adjacent character to see if it is "bad" or "good". Approach First if the string is 1 or fewer characters we know it is good so we can just return it. If that's not the case, we c...DiscussLeetCode journeyC#
Evelyn Liuevelynsjourney.hashnode.dev·Apr 1, 2024Day 49 of LeetCodeDocumenting LeetCode solving. Q126 10. Regular Expression Matching Hard. DP class Solution: def isMatch(self, s: str, p: str) -> bool: dp = {} def dfs(i, j): if (i, j) in dp: return dp[(i, j)] ...Discuss30+20 days of LeetCode leetcode
Software Engineering Bloghuanan.hashnode.dev·Mar 30, 2024Leetcode 713: Subarray Product Less Than KFor those who would like to try it out first! https://leetcode.com/problems/subarray-product-less-than-k/ Question Given an array of integers nums and an integer k, return the number of contiguous subarrays where the product of all the elements in th...Discusssliding window
Evelyn Liuevelynsjourney.hashnode.dev·Mar 29, 2024Day 48 of LeetCodeDocumenting LeetCode solving. Q125 312. Burst Balloons Hard. DP Reverse thinking. class Solution: def maxCoins(self, nums: List[int]) -> int: nums = [1] + nums + [1] dp = {} def dfs(l, r): if l > r: ...Discuss30+20 days of LeetCode leetcode
Evelyn Liuevelynsjourney.hashnode.dev·Mar 26, 2024Day 47 of LeetCodeDocumenting LeetCode solving. Q123 115. Distinct Subsequences Hard. DP class Solution: def numDistinct(self, s: str, t: str) -> int: dp = {} def dfs(i, j): if j == len(t): return 1 if i == ...Discuss30+20 days of LeetCode leetcode
Evelyn Liuevelynsjourney.hashnode.dev·Mar 25, 2024Day 46 of LeetCodeDocumenting LeetCode solving. Q121 97. Interleaving String Medium. 2D DP. class Solution: def isInterleave(self, s1: str, s2: str, s3: str) -> bool: if len(s1) + len(s2) != len(s3): return False dp = [[False] * (len(s...Discuss30+20 days of LeetCode leetcode
Evelyn Liuevelynsjourney.hashnode.dev·Mar 22, 2024Day 45 of LeetCodeDocumenting LeetCode solving. Q120 494. Target Sum Medium. DP class Solution: def findTargetSumWays(self, nums: List[int], target: int) -> int: dp = {} # (index, total) -> number of ways def backtrack(i, total): if i ...Discuss30+20 days of LeetCode leetcode