#leetcodemedium Suchergebnisse
#73 Set Matrix Zeroes ๐ฆ Given an mรn matrix, if an element = 0 โ set its row & col to 0. โก In-place, O(1) space: use 1st row/col as markers โ mark, zero out, then fix 1st row/col. ๐ Time: O(mn) | Space: O(1) #SetMatrixZeroes #LeetCodeMedium #InterviewReady

โMarked the numbers, flipped the signs, and caught the sneaky duplicates. Clean, fast, and memory-wise. โก #LeetCodeMedium #JavaMastery #CodeSmartโ

๐ค๏ธ #64 Minimum Path Sum Find the min path sum in an mรn grid, moving only โฌ๏ธ or โก๏ธ. Ex: [[1,3,1],[1,5,1],[4,2,1]] โ 7 โ (path: 1โ3โ1โ1โ1) ๐ก DP trick: dp[i][j] = grid[i][j] + min(top,left) โฑ O(mn), ๐ O(mn)/O(n). #DynamicProgramming #LeetCodeMedium #InterviewReady
![eninjain's tweet image. ๐ค๏ธ #64 Minimum Path Sum
Find the min path sum in an mรn grid, moving only โฌ๏ธ or โก๏ธ.
Ex: [[1,3,1],[1,5,1],[4,2,1]] โ 7 โ
(path: 1โ3โ1โ1โ1)
๐ก DP trick: dp[i][j] = grid[i][j] + min(top,left)
โฑ O(mn), ๐ O(mn)/O(n).
#DynamicProgramming #LeetCodeMedium #InterviewReady](https://pbs.twimg.com/media/GzqZ-KdaAAA3-Qt.jpg)
๐ฃ๏ธ #71 Simplify Path Simplify a Unix-style absolute path. / separates dirs, . = current, .. = parent. Remove extra slashes. Ex: "/home/"โ"/home", "/a/./b/../../c/"โ"/c" โ โฑ O(n) | ๐ฆ O(n) #SimplifyPath #StringParsing #LeetCodeMedium #UnixPaths #EdgeCases

Stop using arrays to solve linked list leetcode problems. Leetcode 92 - Reverse Linked List 2 - C++ #LeetcodeMedium #LinkedList

๐ข #81 Search in Rotated Sorted Array Find a target in a sorted array rotated at a pivot. ๐ฏ Use modified binary search: check which half is sorted, then narrow search. Input: [4,5,6,7,0,1,2], target=0 โ Output: 4 โ O(log n) time, O(1) space. #BinarySearch #LeetCodeMedium
![eninjain's tweet image. ๐ข #81 Search in Rotated Sorted Array
Find a target in a sorted array rotated at a pivot. ๐ฏ Use modified binary search: check which half is sorted, then narrow search.
Input: [4,5,6,7,0,1,2], target=0 โ Output: 4 โ
O(log n) time, O(1) space.
#BinarySearch #LeetCodeMedium](https://pbs.twimg.com/media/G2BxmoZW0AA8SKf.jpg)
#74 Search 2D Matrix Matrix sorted row-wise & first of each row > last of prev. Find target โ โก Trick: treat it as 1D โ Binary Search! row=mid/n, col=mid%n โฑ O(log(mn)) | ๐พ O(1) #Search2DMatrix #BinarySearch #LeetCodeMedium #InterviewReady

452. Minimum Number of Arrows to Burst Balloons. Leetcode problem solution in Golang. #Leetcode150 #LeetcodeMedium #Golang

Solved another problem which is based on sliding window technique. Leetcode 1004 - Max Consecutive Ones III Check reply to view my solution. #LeetcodeMedium #SlidingWindow #Arrays

I think this is the first medium level problem which I have solved using Go ๐ฅณ Leetcode 2095 - Delete middle node of linked list - Solution in Go. #LeetcodeMedium #LinkedList #100DaysOfCode

๐ข #50 Pow(x, n) โ Raise x to power n โก Donโt multiply x again & again! Use Fast Power: ๐ If n even: xโฟ = (xยฒ)โฟโยฒ ๐ If n odd: xโฟ = x ร (xยฒ)โฟโยฒ ๐ If n < 0: flip โ x = 1/x, n = -n โฑ Time: O(log n) ๐ฆ Space: O(1) #SmartMath #BinaryPower #LeetCodeMedium

I started my weekend by solving a Leetcode medium level problem. Leetcode 1493 - Longest subarray of ones after deleting one element - Solution in Go. #Leetcode #TwoPointers #LeetcodeMedium #Go #Golang

๐ง #63 Unique Paths II Robot in mรn grid w/ obstacles (1). Only moves โฌ๏ธโก๏ธ. Find unique paths to bottom-right! ๐ฆ Ex: [[0,0,0],[0,1,0],[0,0,0]] โ 2 โ ๐ DP: dp[i][j]=0 if obs; else dp[i-1][j]+dp[i][j-1] โฑ O(mn), ๐ O(mn) #UniquePathsII #DP #LeetCodeMedium #InterviewReady
![eninjain's tweet image. ๐ง #63 Unique Paths II
Robot in mรn grid w/ obstacles (1). Only moves โฌ๏ธโก๏ธ.
Find unique paths to bottom-right!
๐ฆ Ex: [[0,0,0],[0,1,0],[0,0,0]] โ 2 โ
๐ DP:
dp[i][j]=0 if obs; else dp[i-1][j]+dp[i][j-1]
โฑ O(mn), ๐ O(mn)
#UniquePathsII #DP #LeetCodeMedium #InterviewReady](https://pbs.twimg.com/media/GzqTbGwb0AALHe5.jpg)
๐ข #57 Insert Interval Youโve got sorted, non-overlapping intervals & a new one barging in ๐ฌ ๐ฅ Slide it in! โ Add before it ๐ Merge overlaps ๐ Drop it in ๐ฅ Add the rest! Ex: [[1,3],[6,9]], [2,5] โ [[1,5],[6,9]] โฑ๏ธ O(n) | ๐ฆ O(n) #SmartMerge #GreedyMoves #LeetCodeMedium
![eninjain's tweet image. ๐ข #57 Insert Interval
Youโve got sorted, non-overlapping intervals &amp; a new one barging in ๐ฌ
๐ฅ Slide it in!
โ
Add before it
๐ Merge overlaps
๐ Drop it in
๐ฅ Add the rest!
Ex: [[1,3],[6,9]], [2,5] โ [[1,5],[6,9]]
โฑ๏ธ O(n) | ๐ฆ O(n)
#SmartMerge #GreedyMoves #LeetCodeMedium](https://pbs.twimg.com/media/GxXEv6GXwAAkwMS.jpg)
I spent some time to understand mathematical proof from editorial solution, this solution depends more on mathematical proof than coding skills for sure. Leetcode 179: Largest Number: Solution in Go. #LeetcodeMedium #DSA #Golang #Go

๐ข #77 Combinations Given n & k, return all k-number combinations from 1..n. โก Use backtracking: build recursively, track current combo, add when size=k. ๐ฆ Example: n=4, k=2 โ [ [1,2],[1,3],[1,4],[2,3],[2,4],[3,4] ] #Combinations #Backtracking #LeetCodeMedium
![eninjain's tweet image. ๐ข #77 Combinations
Given n &amp; k, return all k-number combinations from 1..n.
โก Use backtracking: build recursively, track current combo, add when size=k.
๐ฆ Example: n=4, k=2 โ [ [1,2],[1,3],[1,4],[2,3],[2,4],[3,4] ]
#Combinations #Backtracking #LeetCodeMedium](https://pbs.twimg.com/media/G1XArn1WkAEQ980.jpg)
Fraction to Recurring Decimal | LeetCode 166 | Sep Day 24 | Hashing + String โ โ๏ธ youtu.be/7juLYhaCBQs . . . . . . . . . . . . #leetcodesolution #leetcodedaily #leetcodemedium #faangprep #startup #dsa #hashmap #math #codeexplain #coderlife #codingchallenge #prepareinterview

Implement Router | LeetCode 3508 | Sep Day 20 | Binary Search + Hashing โ โ๏ธ youtu.be/4AJLtXZchfs?siโฆ . . . . . . . . . . . . . #leetcodesolution #leetcodedaily #leetcodemedium #faangprep #startup #dsa #queue #hashmap #codeexplain #coderlife #codingchallenge #leetcode3508

Sep day 18 Challenge is live, please do check it out โ youtu.be/_dKpo85-uSo?siโฆ . . . . . . . . . . . . . #leetcodesolution #leetcodedaily #leetcodemedium #leetcodegrind #faangprep #startup #dsa #hashmap #priorityQueue #codeexplain #coderlife #codingchallenge #prepareinterview

99. Recover Binary Search Tree Leetcode problem solution using Golang. #LeetcodeMedium #BinarySearchTree

โMarked the numbers, flipped the signs, and caught the sneaky duplicates. Clean, fast, and memory-wise. โก #LeetCodeMedium #JavaMastery #CodeSmartโ

452. Minimum Number of Arrows to Burst Balloons. Leetcode problem solution in Golang. #Leetcode150 #LeetcodeMedium #Golang

#73 Set Matrix Zeroes ๐ฆ Given an mรn matrix, if an element = 0 โ set its row & col to 0. โก In-place, O(1) space: use 1st row/col as markers โ mark, zero out, then fix 1st row/col. ๐ Time: O(mn) | Space: O(1) #SetMatrixZeroes #LeetCodeMedium #InterviewReady

๐ค๏ธ #64 Minimum Path Sum Find the min path sum in an mรn grid, moving only โฌ๏ธ or โก๏ธ. Ex: [[1,3,1],[1,5,1],[4,2,1]] โ 7 โ (path: 1โ3โ1โ1โ1) ๐ก DP trick: dp[i][j] = grid[i][j] + min(top,left) โฑ O(mn), ๐ O(mn)/O(n). #DynamicProgramming #LeetCodeMedium #InterviewReady
![eninjain's tweet image. ๐ค๏ธ #64 Minimum Path Sum
Find the min path sum in an mรn grid, moving only โฌ๏ธ or โก๏ธ.
Ex: [[1,3,1],[1,5,1],[4,2,1]] โ 7 โ
(path: 1โ3โ1โ1โ1)
๐ก DP trick: dp[i][j] = grid[i][j] + min(top,left)
โฑ O(mn), ๐ O(mn)/O(n).
#DynamicProgramming #LeetCodeMedium #InterviewReady](https://pbs.twimg.com/media/GzqZ-KdaAAA3-Qt.jpg)
452. Minimum Number of Arrows to Burst Balloons. Leetcode problem solution in Golang. #Leetcode150 #LeetcodeMedium #Golang

โMarked the numbers, flipped the signs, and caught the sneaky duplicates. Clean, fast, and memory-wise. โก #LeetCodeMedium #JavaMastery #CodeSmartโ

๐ง #63 Unique Paths II Robot in mรn grid w/ obstacles (1). Only moves โฌ๏ธโก๏ธ. Find unique paths to bottom-right! ๐ฆ Ex: [[0,0,0],[0,1,0],[0,0,0]] โ 2 โ ๐ DP: dp[i][j]=0 if obs; else dp[i-1][j]+dp[i][j-1] โฑ O(mn), ๐ O(mn) #UniquePathsII #DP #LeetCodeMedium #InterviewReady
![eninjain's tweet image. ๐ง #63 Unique Paths II
Robot in mรn grid w/ obstacles (1). Only moves โฌ๏ธโก๏ธ.
Find unique paths to bottom-right!
๐ฆ Ex: [[0,0,0],[0,1,0],[0,0,0]] โ 2 โ
๐ DP:
dp[i][j]=0 if obs; else dp[i-1][j]+dp[i][j-1]
โฑ O(mn), ๐ O(mn)
#UniquePathsII #DP #LeetCodeMedium #InterviewReady](https://pbs.twimg.com/media/GzqTbGwb0AALHe5.jpg)
๐ฃ๏ธ #71 Simplify Path Simplify a Unix-style absolute path. / separates dirs, . = current, .. = parent. Remove extra slashes. Ex: "/home/"โ"/home", "/a/./b/../../c/"โ"/c" โ โฑ O(n) | ๐ฆ O(n) #SimplifyPath #StringParsing #LeetCodeMedium #UnixPaths #EdgeCases

Solved another problem which is based on sliding window technique. Leetcode 1004 - Max Consecutive Ones III Check reply to view my solution. #LeetcodeMedium #SlidingWindow #Arrays

๐ข #81 Search in Rotated Sorted Array Find a target in a sorted array rotated at a pivot. ๐ฏ Use modified binary search: check which half is sorted, then narrow search. Input: [4,5,6,7,0,1,2], target=0 โ Output: 4 โ O(log n) time, O(1) space. #BinarySearch #LeetCodeMedium
![eninjain's tweet image. ๐ข #81 Search in Rotated Sorted Array
Find a target in a sorted array rotated at a pivot. ๐ฏ Use modified binary search: check which half is sorted, then narrow search.
Input: [4,5,6,7,0,1,2], target=0 โ Output: 4 โ
O(log n) time, O(1) space.
#BinarySearch #LeetCodeMedium](https://pbs.twimg.com/media/G2BxmoZW0AA8SKf.jpg)
Stop using arrays to solve linked list leetcode problems. Leetcode 92 - Reverse Linked List 2 - C++ #LeetcodeMedium #LinkedList

๐ข #50 Pow(x, n) โ Raise x to power n โก Donโt multiply x again & again! Use Fast Power: ๐ If n even: xโฟ = (xยฒ)โฟโยฒ ๐ If n odd: xโฟ = x ร (xยฒ)โฟโยฒ ๐ If n < 0: flip โ x = 1/x, n = -n โฑ Time: O(log n) ๐ฆ Space: O(1) #SmartMath #BinaryPower #LeetCodeMedium

I think this is the first medium level problem which I have solved using Go ๐ฅณ Leetcode 2095 - Delete middle node of linked list - Solution in Go. #LeetcodeMedium #LinkedList #100DaysOfCode

๐ข #57 Insert Interval Youโve got sorted, non-overlapping intervals & a new one barging in ๐ฌ ๐ฅ Slide it in! โ Add before it ๐ Merge overlaps ๐ Drop it in ๐ฅ Add the rest! Ex: [[1,3],[6,9]], [2,5] โ [[1,5],[6,9]] โฑ๏ธ O(n) | ๐ฆ O(n) #SmartMerge #GreedyMoves #LeetCodeMedium
![eninjain's tweet image. ๐ข #57 Insert Interval
Youโve got sorted, non-overlapping intervals &amp; a new one barging in ๐ฌ
๐ฅ Slide it in!
โ
Add before it
๐ Merge overlaps
๐ Drop it in
๐ฅ Add the rest!
Ex: [[1,3],[6,9]], [2,5] โ [[1,5],[6,9]]
โฑ๏ธ O(n) | ๐ฆ O(n)
#SmartMerge #GreedyMoves #LeetCodeMedium](https://pbs.twimg.com/media/GxXEv6GXwAAkwMS.jpg)
I started my weekend by solving a Leetcode medium level problem. Leetcode 1493 - Longest subarray of ones after deleting one element - Solution in Go. #Leetcode #TwoPointers #LeetcodeMedium #Go #Golang

I spent some time to understand mathematical proof from editorial solution, this solution depends more on mathematical proof than coding skills for sure. Leetcode 179: Largest Number: Solution in Go. #LeetcodeMedium #DSA #Golang #Go

#74 Search 2D Matrix Matrix sorted row-wise & first of each row > last of prev. Find target โ โก Trick: treat it as 1D โ Binary Search! row=mid/n, col=mid%n โฑ O(log(mn)) | ๐พ O(1) #Search2DMatrix #BinarySearch #LeetCodeMedium #InterviewReady

This problem can be easily solved if you are familiar with sliding window technique. Leetcode 1456 - Maximum number of vowels in a substring of given length - Leetcode Medium. Problem link - leetcode.com/problems/maximโฆ #Leetcode #LeetcodeMedium #Arrays

Something went wrong.
Something went wrong.
United States Trends
- 1. Texans 38K posts
- 2. World Series 112K posts
- 3. CJ Stroud 6,775 posts
- 4. Blue Jays 97.2K posts
- 5. Mariners 93.6K posts
- 6. Seahawks 36.9K posts
- 7. Springer 68.2K posts
- 8. Nick Caley 2,667 posts
- 9. White House 317K posts
- 10. Dan Wilson 4,351 posts
- 11. LA Knight 8,438 posts
- 12. Dodgers in 5 2,263 posts
- 13. Nico Collins 2,149 posts
- 14. #WWERaw 61.9K posts
- 15. Kenneth Walker 2,592 posts
- 16. Bazardo 3,201 posts
- 17. Demeco 1,823 posts
- 18. Sanae Takaichi 37.8K posts
- 19. #LaCasaDeAlofoke2 15.6K posts
- 20. Sam Darnold 4,388 posts