Sean Coughlinblog.seancoughlin.me·Jun 28, 2024Mastering LeetCode: Solving the "Product of Array Except Self" ProblemIntroduction Solving algorithmic problems is a critical skill for any aspiring software engineer, and LeetCode offers a treasure trove of challenges to hone this skill. One such problem is the "Product of Array Except Self," a classic problem that te...DiscussSWE Interview Preparationleetcode
Sean Coughlinblog.seancoughlin.me·Jun 27, 2024Mastering LeetCode's Coin Change Problem: A Comprehensive GuideIntroduction The "Coin Change" problem is a classic algorithmic challenge that often appears in coding interviews and competitive programming. Solving this problem efficiently is crucial for aspiring software engineers as it tests one's understanding...Discuss·37 readsSWE Interview Preparationleetcode
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...Discuss·111 readsSWE Interview Preparationleetcode
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
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
Evelyn Liuevelynsjourney.hashnode.dev·Mar 19, 2024Day 44 of LeetCodeDocumenting LeetCode solving. Q119 518. Coin Change II Medium. 2D DP Spent a lot of time drawing the grid. class Solution: def change(self, amount: int, coins: List[int]) -> int: dp = [[0] * (amount + 1) for _ in range(len(coins) + 1)] ...Discuss30+20 days of LeetCode Learning Journey
Evelyn Liuevelynsjourney.hashnode.dev·Mar 18, 2024Day 43 of LeetCodeDocumenting LeetCode solving. Q117 127. Word Ladder Hard. Graph BFS class Solution: def ladderLength(self, beginWord: str, endWord: str, wordList: List[str]) -> int: if endWord not in wordList: return 0 nei = collecti...Discuss30+20 days of LeetCode leetcode