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
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
Sean Coughlinblog.seancoughlin.me·Mar 15, 2024Cracking the Code: Mastering the "Ransom Note" Challenge on LeetCodeAs someone deeply passionate about coding and problem-solving, I've always found joy in dissecting and understanding the nuances of coding challenges. Today, I'm thrilled to share insights into tackling a fascinating problem from LeetCode - the "Rans...Discuss·34 readsSWE Interview PreparationJavaScript
Sean Coughlinblog.seancoughlin.me·Mar 15, 2024Mastering LeetCode's Majority Element Problem: Strategies for Every EngineerWelcome to another installment in the software engineering interview tutorial series. Today, we're diving deep into a popular LeetCode problem: finding the Majority Element in an array (LeetCode 169). This problem is a fantastic opportunity to explor...Discuss·40 readsSWE Interview Preparationleetcode