#leetcode75 Suchergebnisse

Day 19 of #LeetCode75 Problem: 735. Asteroid Collision Idea: Use a stack. If it’s moving right, push it. If it’s moving left, check collisions. Pop smaller ones until collision is resolved. Time: O(n) Space: O(n) #LeetCode #75DaysChallenge #Day19 #DSA #ProblemSolving

ANNISH_SEN's tweet image. Day 19 of #LeetCode75 

Problem: 735. Asteroid Collision

Idea:

Use a stack.

If it’s moving right, push it.

If it’s moving left, check collisions. 

Pop smaller ones until collision is resolved.

Time: O(n)
Space: O(n)

#LeetCode #75DaysChallenge #Day19 #DSA #ProblemSolving
ANNISH_SEN's tweet image. Day 19 of #LeetCode75 

Problem: 735. Asteroid Collision

Idea:

Use a stack.

If it’s moving right, push it.

If it’s moving left, check collisions. 

Pop smaller ones until collision is resolved.

Time: O(n)
Space: O(n)

#LeetCode #75DaysChallenge #Day19 #DSA #ProblemSolving

Binary Tree - DFS Leaf-Similar Trees #LeetCode75 34/75 #Python #DSA #100DaysOfCode #LeetCode

Priyansh0310's tweet image. Binary Tree - DFS  
Leaf-Similar Trees #LeetCode75        

34/75       

#Python #DSA #100DaysOfCode #LeetCode
Priyansh0310's tweet image. Binary Tree - DFS  
Leaf-Similar Trees #LeetCode75        

34/75       

#Python #DSA #100DaysOfCode #LeetCode

These are My last Contests I am improving gradually but still stucked not able to cross q3 mark please provide some advice how to break this barieer . #leetcode75 #programming #coding #learnInPublic

Rishabh38074426's tweet image. These are My last Contests I am improving gradually but still stucked not able to cross q3 mark please provide some advice how to break this barieer .
#leetcode75 #programming #coding #learnInPublic

Day 3 of LeetCode 75 Problem: 605. Can Place Flowers 🔑 Idea: 1.Check each plot. 2.A flower can be planted only if previous, current, and next are all empty. 3.Greedily place flowers and count. 4.If count ≥ n → return true. ⏱️ TC: O(n) | SC: O(1) #DSA #LeetCode #LeetCode75

ANNISH_SEN's tweet image. Day 3 of LeetCode 75
Problem: 605. Can Place Flowers 
🔑 Idea:

1.Check each plot.
2.A flower can be planted only if previous, current, and next are all empty.
3.Greedily place flowers and count.
4.If count ≥ n → return true.

⏱️ TC: O(n) | SC: O(1)
 #DSA #LeetCode #LeetCode75
ANNISH_SEN's tweet image. Day 3 of LeetCode 75
Problem: 605. Can Place Flowers 
🔑 Idea:

1.Check each plot.
2.A flower can be planted only if previous, current, and next are all empty.
3.Greedily place flowers and count.
4.If count ≥ n → return true.

⏱️ TC: O(n) | SC: O(1)
 #DSA #LeetCode #LeetCode75

🗓️ Day 1 of LeetCode75 Problem: 1768. Merge Strings Alternately 🔑 Idea: Use max(len1, len2) and merge character by character. Append leftovers at the end. ⏱️ Time: O(n) | Space: O(1) extra ✅ First step toward finishing #LeetCode75 in <75 days! 🚀 #100DaysOfCode #DSA #LeetCode

ANNISH_SEN's tweet image. 🗓️ Day 1 of LeetCode75
Problem: 1768. Merge Strings Alternately
🔑 Idea: Use max(len1, len2) and merge character by character. Append leftovers at the end.
⏱️ Time: O(n) | Space: O(1) extra
✅ First step toward finishing #LeetCode75 in &amp;lt;75 days! 🚀
#100DaysOfCode #DSA #LeetCode

Day 23 of #LeetCode75 Problem:328.Odd Even Linked List Idea: 1.Separate nodes into odd and even positions. 2.Connect odd nodes first, then even. Time:O(n) Space:O(1) Sometimes,you’ve to reorder to keep the chain organized. #LeetCode #75DaysChallenge #Day23 #DSA #LinkedList

ANNISH_SEN's tweet image. Day 23 of #LeetCode75
Problem:328.Odd Even Linked List
 Idea:
1.Separate nodes into odd and even positions.
2.Connect odd nodes first, then even. 
Time:O(n)
Space:O(1)
Sometimes,you’ve to reorder to keep the chain organized.
#LeetCode #75DaysChallenge #Day23 #DSA #LinkedList
ANNISH_SEN's tweet image. Day 23 of #LeetCode75
Problem:328.Odd Even Linked List
 Idea:
1.Separate nodes into odd and even positions.
2.Connect odd nodes first, then even. 
Time:O(n)
Space:O(1)
Sometimes,you’ve to reorder to keep the chain organized.
#LeetCode #75DaysChallenge #Day23 #DSA #LinkedList

Day 9 of #LeetCode75 Solved 1679. Max Number of K-Sum Pairs Approach: Sort the array Use two pointers (start & end) If sum == k → count++ and move both Else adjust pointers accordingly Time: O(n log n) Space: O(1) #100DaysOfCode #LeetCode #DSA #ProblemSolving #Day8

ANNISH_SEN's tweet image. Day 9 of #LeetCode75 
Solved 1679. Max Number of K-Sum Pairs 

 Approach:

Sort the array

Use two pointers (start &amp;amp; end)

If sum == k → count++ and move both

Else adjust pointers accordingly

Time: O(n log n)
Space: O(1)

#100DaysOfCode #LeetCode #DSA #ProblemSolving #Day8

🧠 Day 14 – LeetCode 66: Plus One Input: [9,9,9] → Output: [1,0,0,0] Loop from end, add 1 → if <10 return, else set to 0. If all 9s, return [1, ...digits]. One-pass, clean logic. #LeetCode75 #100DaysOfCode #StriverSheet #JavaScript #CleanCode #DevJourney

Nuwal_Peyush's tweet image. 🧠 Day 14 – LeetCode 66: Plus One
Input: [9,9,9] → Output: [1,0,0,0]
Loop from end, add 1 → if &amp;lt;10 return, else set to 0.
If all 9s, return [1, ...digits].
One-pass, clean logic.
#LeetCode75 #100DaysOfCode #StriverSheet #JavaScript #CleanCode #DevJourney

Day 13 of #LeetCode75 Solved 1493. Longest Subarray of 1's After Deleting One Element Approach: Sliding Window / 2 Pointers Track consecutive 1’s with at most one deletion Update max length as we move Time: O(n) Space: O(1) #100DaysOfCode #LeetCode #DSA #ProblemSolving

ANNISH_SEN's tweet image. Day 13 of #LeetCode75 
Solved 1493. Longest Subarray of 1&apos;s After Deleting One Element 

 Approach:

Sliding Window / 2 Pointers

Track consecutive 1’s with at most one deletion

Update max length as we move

Time: O(n)
Space: O(1)

#100DaysOfCode #LeetCode #DSA #ProblemSolving
ANNISH_SEN's tweet image. Day 13 of #LeetCode75 
Solved 1493. Longest Subarray of 1&apos;s After Deleting One Element 

 Approach:

Sliding Window / 2 Pointers

Track consecutive 1’s with at most one deletion

Update max length as we move

Time: O(n)
Space: O(1)

#100DaysOfCode #LeetCode #DSA #ProblemSolving

Day 18 of #LeetCode75 Problem: 2390. Removing Stars From a String Idea: Use a string as a stack. If it’s a normal character → push it. If it’s a * →pop the last character. Return the final string. Time: O(n) Space: O(n) #LeetCode #Day18 #DSA #ProblemSolving #CodingJourney

ANNISH_SEN's tweet image. Day 18 of #LeetCode75
Problem: 2390. Removing Stars From a String
Idea:
Use a string as a stack.
If it’s a normal character → push it.
If it’s a * →pop the last character.
Return the final string.
Time: O(n)
 Space: O(n)
#LeetCode #Day18 #DSA #ProblemSolving  #CodingJourney
ANNISH_SEN's tweet image. Day 18 of #LeetCode75
Problem: 2390. Removing Stars From a String
Idea:
Use a string as a stack.
If it’s a normal character → push it.
If it’s a * →pop the last character.
Return the final string.
Time: O(n)
 Space: O(n)
#LeetCode #Day18 #DSA #ProblemSolving  #CodingJourney

🗓️ Day 2 of #LeetCode75 Problem: 1431. Kids With the Greatest Number of Candies Time: O(n) Space: O(n) #LeetCode75 #100DaysOfCode #DSA #LeetCode

ANNISH_SEN's tweet image. 🗓️ Day 2 of #LeetCode75
Problem: 1431. Kids With the Greatest Number of Candies 
        Time: O(n) 
        Space: O(n)
#LeetCode75 #100DaysOfCode #DSA #LeetCode
ANNISH_SEN's tweet image. 🗓️ Day 2 of #LeetCode75
Problem: 1431. Kids With the Greatest Number of Candies 
        Time: O(n) 
        Space: O(n)
#LeetCode75 #100DaysOfCode #DSA #LeetCode

Day 30 of #LeetCode75 Problem: 199 Approach: Use DFS. traverse the right subtree first, then the left. If we enter a new level for the first time, record that node’s value. Time:O(n) Space:O(h) #LeetCode #75DaysChallenge #Day30 #DSA #BinaryTree #CodingJourney #KeepLearning

ANNISH_SEN's tweet image. Day 30 of #LeetCode75
 Problem: 199
Approach:
Use DFS.
traverse the right subtree first, then the left.
If we enter a new level for the first time, record that node’s value.

Time:O(n)
 Space:O(h)

#LeetCode #75DaysChallenge #Day30 #DSA #BinaryTree #CodingJourney #KeepLearning
ANNISH_SEN's tweet image. Day 30 of #LeetCode75
 Problem: 199
Approach:
Use DFS.
traverse the right subtree first, then the left.
If we enter a new level for the first time, record that node’s value.

Time:O(n)
 Space:O(h)

#LeetCode #75DaysChallenge #Day30 #DSA #BinaryTree #CodingJourney #KeepLearning

Binary Tree - DFS Count Good Nodes in Binary Tree #LeetCode75 36/75 #Python #DSA #100DaysOfCode #LeetCode

Priyansh0310's tweet image. Binary Tree - DFS    
Count Good Nodes in Binary Tree #LeetCode75            

36/75           

#Python #DSA #100DaysOfCode #LeetCode
Priyansh0310's tweet image. Binary Tree - DFS    
Count Good Nodes in Binary Tree #LeetCode75            

36/75           

#Python #DSA #100DaysOfCode #LeetCode

Binary Tree - DFS Longest ZigZag Path in a Binary Tree #LeetCode75 37/75 #Python #DSA #100DaysOfCode #LeetCode

Priyansh0310's tweet image. Binary Tree - DFS     
Longest ZigZag Path in a Binary Tree #LeetCode75              

37/75             

#Python #DSA #100DaysOfCode #LeetCode
Priyansh0310's tweet image. Binary Tree - DFS     
Longest ZigZag Path in a Binary Tree #LeetCode75              

37/75             

#Python #DSA #100DaysOfCode #LeetCode

Binary Tree - BFS Binary Tree Right Side View #LeetCode75 39/75 #Python #DSA #100DaysOfCode #LeetCode

Priyansh0310's tweet image. Binary Tree - BFS      
Binary Tree Right Side View #LeetCode75                  

39/75                 

#Python #DSA #100DaysOfCode #LeetCode
Priyansh0310's tweet image. Binary Tree - BFS      
Binary Tree Right Side View #LeetCode75                  

39/75                 

#Python #DSA #100DaysOfCode #LeetCode

🧠 Day 17 – LeetCode 11: Container With Most Water Input: [1,8,6,2,5,4,8,3,7] → Output: 49 #LeetCode75 #100DaysOfCode #StriverSheet #JavaScript #CleanCode #WebDev #FrontendDev #DevCommunity #BuildInPublic

Nuwal_Peyush's tweet image. 🧠 Day 17 – LeetCode 11: Container With Most Water
 Input: [1,8,6,2,5,4,8,3,7] → Output: 49 

#LeetCode75 #100DaysOfCode #StriverSheet #JavaScript #CleanCode #WebDev #FrontendDev #DevCommunity #BuildInPublic

Binary Tree - DFS Maximum Depth of Binary Tree #LeetCode75 33/75 #Python #DSA #100DaysOfCode #LeetCode

Priyansh0310's tweet image. Binary Tree - DFS 
Maximum Depth of Binary Tree #LeetCode75      

33/75     

#Python #DSA #100DaysOfCode #LeetCode
Priyansh0310's tweet image. Binary Tree - DFS 
Maximum Depth of Binary Tree #LeetCode75      

33/75     

#Python #DSA #100DaysOfCode #LeetCode

Binary Tree - DFS Lowest Common Ancestor of a Binary Tree #LeetCode75 38/75 #Python #DSA #100DaysOfCode #LeetCode

Priyansh0310's tweet image. Binary Tree - DFS     
Lowest Common Ancestor of a Binary Tree #LeetCode75                

38/75               

#Python #DSA #100DaysOfCode #LeetCode
Priyansh0310's tweet image. Binary Tree - DFS     
Lowest Common Ancestor of a Binary Tree #LeetCode75                

38/75               

#Python #DSA #100DaysOfCode #LeetCode

Day 33 of the #Leetcode75 Challenge! 🔸Solved 2 medium level problems from #leetcode75 🔸Solved POTD Progress - 71/75 ✅ #LeetCode #CodingJourney #CodingCommunity

astha_ade's tweet image. Day 33 of the  #Leetcode75 Challenge!

🔸Solved 2 medium level problems from #leetcode75 
🔸Solved POTD

 Progress - 71/75 ✅ 

#LeetCode #CodingJourney #CodingCommunity
astha_ade's tweet image. Day 33 of the  #Leetcode75 Challenge!

🔸Solved 2 medium level problems from #leetcode75 
🔸Solved POTD

 Progress - 71/75 ✅ 

#LeetCode #CodingJourney #CodingCommunity

Day 31 of the #Leetcode75 Challenge! 🔸Solved 2 easy level problems using Bit Manipulation 🔸Solved POTD Progress - 67/75 ✅ #LeetCode #CodingJourney #CodingCommunity

astha_ade's tweet image. Day 31 of the  #Leetcode75 Challenge!

🔸Solved 2 easy level problems using Bit Manipulation 
🔸Solved POTD

 Progress - 67/75 ✅ 

#LeetCode #CodingJourney #CodingCommunity
astha_ade's tweet image. Day 31 of the  #Leetcode75 Challenge!

🔸Solved 2 easy level problems using Bit Manipulation 
🔸Solved POTD

 Progress - 67/75 ✅ 

#LeetCode #CodingJourney #CodingCommunity

Day 33 of #LeetCode75 Problem: 700. Search in a BST BST rule makes searching super simple If val<root→go left If val>root→go right If equal→found it! Time: O(log N) for balanced BST Space: O(1) #LeetCode #Day31 #DSA #BinarySearchTree #CodingInCPlusPlus #100DaysOfCode

ANNISH_SEN's tweet image. Day 33 of #LeetCode75
Problem: 700. Search in a BST

BST rule makes searching super simple 
If val&amp;lt;root→go left
If val&amp;gt;root→go right
If equal→found it!

Time: O(log N) for balanced BST
Space: O(1)

#LeetCode #Day31 #DSA #BinarySearchTree #CodingInCPlusPlus #100DaysOfCode

Day 32 Of #leetcode75 Problem :450.delete node in a binary search tree. #LeetCode #75DaysChallenge #Day31 #BinaryTree #BFS #DSA #CPl

ANNISH_SEN's tweet image. Day 32 Of #leetcode75
Problem :450.delete node in a binary search tree. 

#LeetCode #75DaysChallenge #Day31 #BinaryTree #BFS #DSA #CPl
ANNISH_SEN's tweet image. Day 32 Of #leetcode75
Problem :450.delete node in a binary search tree. 

#LeetCode #75DaysChallenge #Day31 #BinaryTree #BFS #DSA #CPl

Day 31 of #LeetCode75 Problem: 1161.Maximum Level Sum Binary Tree Approach: Use Level Order Traversal (BFS) with a queue. Update the result when a higher sum is found. TimeO(n) Spac:O(n) #LeetCode #75DaysChallenge #Day31 #BinaryTree #BFS #DSA #CPlusPlus #CodingJourney #cpp

ANNISH_SEN's tweet image. Day 31 of #LeetCode75
Problem: 1161.Maximum Level Sum Binary Tree 

Approach:
Use Level Order Traversal (BFS) with a queue.
Update the result when a higher sum is found.

TimeO(n)
Spac:O(n)

#LeetCode #75DaysChallenge #Day31 #BinaryTree #BFS #DSA #CPlusPlus #CodingJourney #cpp
ANNISH_SEN's tweet image. Day 31 of #LeetCode75
Problem: 1161.Maximum Level Sum Binary Tree 

Approach:
Use Level Order Traversal (BFS) with a queue.
Update the result when a higher sum is found.

TimeO(n)
Spac:O(n)

#LeetCode #75DaysChallenge #Day31 #BinaryTree #BFS #DSA #CPlusPlus #CodingJourney #cpp

Day 4 of #LeetCode75 in the books! ✅ Crushed Problem #605: Can Place Flowers 🌷 with a 1ms solution, beating 97.73% of submissions. Let's go! #100DaysOfCode #Coding

JashanMaan81547's tweet image. Day 4 of #LeetCode75 in the books!
✅ Crushed Problem #605: Can Place Flowers 🌷 with a 1ms solution, beating 97.73% of submissions. Let&apos;s go!

#100DaysOfCode #Coding
JashanMaan81547's tweet image. Day 4 of #LeetCode75 in the books!
✅ Crushed Problem #605: Can Place Flowers 🌷 with a 1ms solution, beating 97.73% of submissions. Let&apos;s go!

#100DaysOfCode #Coding

Day 30 of #LeetCode75 Problem: 199 Approach: Use DFS. traverse the right subtree first, then the left. If we enter a new level for the first time, record that node’s value. Time:O(n) Space:O(h) #LeetCode #75DaysChallenge #Day30 #DSA #BinaryTree #CodingJourney #KeepLearning

ANNISH_SEN's tweet image. Day 30 of #LeetCode75
 Problem: 199
Approach:
Use DFS.
traverse the right subtree first, then the left.
If we enter a new level for the first time, record that node’s value.

Time:O(n)
 Space:O(h)

#LeetCode #75DaysChallenge #Day30 #DSA #BinaryTree #CodingJourney #KeepLearning
ANNISH_SEN's tweet image. Day 30 of #LeetCode75
 Problem: 199
Approach:
Use DFS.
traverse the right subtree first, then the left.
If we enter a new level for the first time, record that node’s value.

Time:O(n)
 Space:O(h)

#LeetCode #75DaysChallenge #Day30 #DSA #BinaryTree #CodingJourney #KeepLearning

🚀 Day 3 of my #LeetCode75 Challenge! Just cracked Problem #1431 — Kids With the Greatest Number of Candies 🍬 ✅ 103/103 test cases passed Small wins like these fuel the big journey ahead. On to the next challenge! 💪🔥 #LeetCode #CodingJourney #ProblemSolving

JashanMaan81547's tweet image. 🚀 Day 3 of my #LeetCode75 Challenge!

Just cracked Problem #1431 — Kids With the Greatest Number of Candies 🍬

✅ 103/103 test cases passed

Small wins like these fuel the big journey ahead. On to the next challenge! 💪🔥

#LeetCode #CodingJourney #ProblemSolving
JashanMaan81547's tweet image. 🚀 Day 3 of my #LeetCode75 Challenge!

Just cracked Problem #1431 — Kids With the Greatest Number of Candies 🍬

✅ 103/103 test cases passed

Small wins like these fuel the big journey ahead. On to the next challenge! 💪🔥

#LeetCode #CodingJourney #ProblemSolving

Day 29 #LeetCode75 Problem: 236. Lowest Common Ancestor Idea: Find the deepest node that’s ancestor of both p & q Return NULL if node is NULL. Return node if it’s p or q. Explore left & right. If both return non-NULL → current node is LCA. #DSA #BinaryTree #CodingJourney #MIET

ANNISH_SEN's tweet image. Day 29 #LeetCode75 
 Problem: 236. Lowest Common Ancestor
Idea: Find the deepest node that’s ancestor of both p &amp;amp; q
Return NULL if node is NULL.
Return node if it’s p or q.
Explore left &amp;amp; right.
If both return non-NULL → current node is LCA.
#DSA #BinaryTree #CodingJourney #MIET
ANNISH_SEN's tweet image. Day 29 #LeetCode75 
 Problem: 236. Lowest Common Ancestor
Idea: Find the deepest node that’s ancestor of both p &amp;amp; q
Return NULL if node is NULL.
Return node if it’s p or q.
Explore left &amp;amp; right.
If both return non-NULL → current node is LCA.
#DSA #BinaryTree #CodingJourney #MIET

🚀 Day 2 of my #LeetCode75 Challenge! Just cracked problem #1071 – Greatest Common Divisor of Strings 🔍✨ One more step toward mastering DSA fundamentals 💪 Consistency > Motivation 🔁 #100DaysOfCode #DSA #LeetCode #CodingJourney

JashanMaan81547's tweet image. 🚀 Day 2 of my #LeetCode75 Challenge!

Just cracked problem #1071 – Greatest Common Divisor of Strings 🔍✨

One more step toward mastering DSA fundamentals 💪
Consistency &amp;gt; Motivation 🔁

#100DaysOfCode #DSA #LeetCode #CodingJourney
JashanMaan81547's tweet image. 🚀 Day 2 of my #LeetCode75 Challenge!

Just cracked problem #1071 – Greatest Common Divisor of Strings 🔍✨

One more step toward mastering DSA fundamentals 💪
Consistency &amp;gt; Motivation 🔁

#100DaysOfCode #DSA #LeetCode #CodingJourney

🚀 Day 1 of my LeetCode 75 Challenge begins today! Just solved the first problem — #1768: Merge Strings Alternately ✅ One step closer to sharpening my DSA skills 💪 Consistency > Motivation. Let’s keep going! 🔥 #LeetCode #LeetCode75 #CodingJourney #100DaysOfCode

JashanMaan81547's tweet image. 🚀 Day 1 of my LeetCode 75 Challenge begins today!

Just solved the first problem — #1768: Merge Strings Alternately ✅

One step closer to sharpening my DSA skills 💪
Consistency &amp;gt; Motivation. Let’s keep going! 🔥

#LeetCode #LeetCode75 #CodingJourney #100DaysOfCode
JashanMaan81547's tweet image. 🚀 Day 1 of my LeetCode 75 Challenge begins today!

Just solved the first problem — #1768: Merge Strings Alternately ✅

One step closer to sharpening my DSA skills 💪
Consistency &amp;gt; Motivation. Let’s keep going! 🔥

#LeetCode #LeetCode75 #CodingJourney #100DaysOfCode
JashanMaan81547's tweet image. 🚀 Day 1 of my LeetCode 75 Challenge begins today!

Just solved the first problem — #1768: Merge Strings Alternately ✅

One step closer to sharpening my DSA skills 💪
Consistency &amp;gt; Motivation. Let’s keep going! 🔥

#LeetCode #LeetCode75 #CodingJourney #100DaysOfCode

Day 27 of #LeetCode75 Problem: 872. Leaf-Similar Trees Approach: Use DFS to store all leaf values of each tree. Compare both vectors at the end. Time:O(n) Space:O(n) #LeetCode #75DaysChallenge #Day27 #DSA #BinaryTree #Recursion #CPlusPlus #CodingJourney #KeepCoding

ANNISH_SEN's tweet image. Day 27 of #LeetCode75
Problem: 872. Leaf-Similar Trees
Approach:
Use DFS to store all leaf values of each tree.
Compare both vectors at the end.
Time:O(n)
Space:O(n)
#LeetCode #75DaysChallenge #Day27 #DSA #BinaryTree #Recursion #CPlusPlus #CodingJourney #KeepCoding
ANNISH_SEN's tweet image. Day 27 of #LeetCode75
Problem: 872. Leaf-Similar Trees
Approach:
Use DFS to store all leaf values of each tree.
Compare both vectors at the end.
Time:O(n)
Space:O(n)
#LeetCode #75DaysChallenge #Day27 #DSA #BinaryTree #Recursion #CPlusPlus #CodingJourney #KeepCoding

Day 25 of #LeetCode75 Problem: 1448. Count Good Nodes in BT Idea: Use DFS and track the max value seen so far. Increment count whenever the current node is“good.” Time: O(n) Space: O(h) #LeetCode #75DaysChallenge #Day25 #DSA #BinaryTree #Recursion #CPlusPlus #CodingJourney

ANNISH_SEN's tweet image. Day 25 of #LeetCode75
Problem: 1448. Count Good Nodes in BT
 Idea:
Use DFS and track the max value seen so far.
Increment count whenever the current node is“good.”

 Time: O(n) 
 Space: O(h)
#LeetCode #75DaysChallenge #Day25 #DSA #BinaryTree #Recursion #CPlusPlus #CodingJourney
ANNISH_SEN's tweet image. Day 25 of #LeetCode75
Problem: 1448. Count Good Nodes in BT
 Idea:
Use DFS and track the max value seen so far.
Increment count whenever the current node is“good.”

 Time: O(n) 
 Space: O(h)
#LeetCode #75DaysChallenge #Day25 #DSA #BinaryTree #Recursion #CPlusPlus #CodingJourney

Day 24 of #LeetCode75 Problem:104.Maximum Depth of Binary Tree Idea: Depth = 1+max(depth of left, depth of right). Base case→if root is NULL, return 0. Time:O(n) Space: O(h)(stack space) #LeetCode #75DaysChallenge #Day24 #DSA #BinaryTree #Recursion #CPlusPlus #CodingJourney

ANNISH_SEN's tweet image. Day 24 of #LeetCode75
 Problem:104.Maximum Depth of Binary Tree 
 Idea:
Depth = 1+max(depth of left, depth of right).
Base case→if root is NULL, return 0.
Time:O(n)
Space: O(h)(stack space)
#LeetCode #75DaysChallenge #Day24 #DSA #BinaryTree #Recursion #CPlusPlus #CodingJourney
ANNISH_SEN's tweet image. Day 24 of #LeetCode75
 Problem:104.Maximum Depth of Binary Tree 
 Idea:
Depth = 1+max(depth of left, depth of right).
Base case→if root is NULL, return 0.
Time:O(n)
Space: O(h)(stack space)
#LeetCode #75DaysChallenge #Day24 #DSA #BinaryTree #Recursion #CPlusPlus #CodingJourney

🧵 LeetCode 75 — Day 11: Smallest Infinite Set Implement a set of positive integers with 3 operations: popSmallest() → removes & returns the smallest number addBack(num) → adds a number back if removed Initialize with all numbers 1…∞ #LeetCode75 #Java #100DaysOfCode


🧵 LeetCode 75 — Day 11: Rotting Oranges Given a grid of oranges: 0 = empty 1 = fresh orange 2 = rotten orange Every minute, rotten oranges rot adjacent fresh ones. Find the minimum minutes until all oranges rot, or -1 if impossible. #LeetCode75 #Java #BFS #100DaysOfCode

coding_zoro's tweet image. 🧵 LeetCode 75 — Day 11: Rotting Oranges
Given a grid of oranges:

0 = empty

1 = fresh orange

2 = rotten orange

Every minute, rotten oranges rot adjacent fresh ones.
Find the minimum minutes until all oranges rot, or -1 if impossible.
#LeetCode75 #Java #BFS #100DaysOfCode

Day 23 of #LeetCode75 Problem:328.Odd Even Linked List Idea: 1.Separate nodes into odd and even positions. 2.Connect odd nodes first, then even. Time:O(n) Space:O(1) Sometimes,you’ve to reorder to keep the chain organized. #LeetCode #75DaysChallenge #Day23 #DSA #LinkedList

ANNISH_SEN's tweet image. Day 23 of #LeetCode75
Problem:328.Odd Even Linked List
 Idea:
1.Separate nodes into odd and even positions.
2.Connect odd nodes first, then even. 
Time:O(n)
Space:O(1)
Sometimes,you’ve to reorder to keep the chain organized.
#LeetCode #75DaysChallenge #Day23 #DSA #LinkedList
ANNISH_SEN's tweet image. Day 23 of #LeetCode75
Problem:328.Odd Even Linked List
 Idea:
1.Separate nodes into odd and even positions.
2.Connect odd nodes first, then even. 
Time:O(n)
Space:O(1)
Sometimes,you’ve to reorder to keep the chain organized.
#LeetCode #75DaysChallenge #Day23 #DSA #LinkedList

Stop watching random tutorials. Start learning smart. LeetCode 75 in C++ — clean explanations, efficient logic, interview focus. 🔥 Full playlist: youtube.com/playlist?list=… #LeetCode #leetcode75 @lanacademy #Problemsolved


🧵 LeetCode 75 — Day 10 (Part 3): Nearest Exit in a Maze Given a maze with walls (+) and open paths (.), find the minimum steps from the entrance to any exit. #LeetCode75 #Java #BFS #100DaysOfCode #LeetCode


📘 LeetCode 75 — Day 10 (Stack) Problem: 2390. Removing Stars From a String For every *, remove it and the character immediately before it. Return the final string after all operations. #LeetCode75 #Stack #Java #100DaysOfCode


Keine Ergebnisse für "#leetcode75"

Binary Tree - DFS Leaf-Similar Trees #LeetCode75 34/75 #Python #DSA #100DaysOfCode #LeetCode

Priyansh0310's tweet image. Binary Tree - DFS  
Leaf-Similar Trees #LeetCode75        

34/75       

#Python #DSA #100DaysOfCode #LeetCode
Priyansh0310's tweet image. Binary Tree - DFS  
Leaf-Similar Trees #LeetCode75        

34/75       

#Python #DSA #100DaysOfCode #LeetCode

Binary Tree - BFS Binary Tree Right Side View #LeetCode75 39/75 #Python #DSA #100DaysOfCode #LeetCode

Priyansh0310's tweet image. Binary Tree - BFS      
Binary Tree Right Side View #LeetCode75                  

39/75                 

#Python #DSA #100DaysOfCode #LeetCode
Priyansh0310's tweet image. Binary Tree - BFS      
Binary Tree Right Side View #LeetCode75                  

39/75                 

#Python #DSA #100DaysOfCode #LeetCode

Day 19 of #LeetCode75 Problem: 735. Asteroid Collision Idea: Use a stack. If it’s moving right, push it. If it’s moving left, check collisions. Pop smaller ones until collision is resolved. Time: O(n) Space: O(n) #LeetCode #75DaysChallenge #Day19 #DSA #ProblemSolving

ANNISH_SEN's tweet image. Day 19 of #LeetCode75 

Problem: 735. Asteroid Collision

Idea:

Use a stack.

If it’s moving right, push it.

If it’s moving left, check collisions. 

Pop smaller ones until collision is resolved.

Time: O(n)
Space: O(n)

#LeetCode #75DaysChallenge #Day19 #DSA #ProblemSolving
ANNISH_SEN's tweet image. Day 19 of #LeetCode75 

Problem: 735. Asteroid Collision

Idea:

Use a stack.

If it’s moving right, push it.

If it’s moving left, check collisions. 

Pop smaller ones until collision is resolved.

Time: O(n)
Space: O(n)

#LeetCode #75DaysChallenge #Day19 #DSA #ProblemSolving

These are My last Contests I am improving gradually but still stucked not able to cross q3 mark please provide some advice how to break this barieer . #leetcode75 #programming #coding #learnInPublic

Rishabh38074426's tweet image. These are My last Contests I am improving gradually but still stucked not able to cross q3 mark please provide some advice how to break this barieer .
#leetcode75 #programming #coding #learnInPublic

Binary Tree - BFS Binary Tree Right Side View #LeetCode75 40/75 slowly moving closer to the goal, 40 days completed. #Python #DSA #100DaysOfCode #LeetCode

Priyansh0310's tweet image. Binary Tree - BFS       
Binary Tree Right Side View #LeetCode75                    

40/75

slowly moving closer to the goal, 40 days completed.                   

#Python #DSA #100DaysOfCode #LeetCode
Priyansh0310's tweet image. Binary Tree - BFS       
Binary Tree Right Side View #LeetCode75                    

40/75

slowly moving closer to the goal, 40 days completed.                   

#Python #DSA #100DaysOfCode #LeetCode

Binary Tree - DFS Maximum Depth of Binary Tree #LeetCode75 33/75 #Python #DSA #100DaysOfCode #LeetCode

Priyansh0310's tweet image. Binary Tree - DFS 
Maximum Depth of Binary Tree #LeetCode75      

33/75     

#Python #DSA #100DaysOfCode #LeetCode
Priyansh0310's tweet image. Binary Tree - DFS 
Maximum Depth of Binary Tree #LeetCode75      

33/75     

#Python #DSA #100DaysOfCode #LeetCode

Binary Tree - DFS Longest ZigZag Path in a Binary Tree #LeetCode75 37/75 #Python #DSA #100DaysOfCode #LeetCode

Priyansh0310's tweet image. Binary Tree - DFS     
Longest ZigZag Path in a Binary Tree #LeetCode75              

37/75             

#Python #DSA #100DaysOfCode #LeetCode
Priyansh0310's tweet image. Binary Tree - DFS     
Longest ZigZag Path in a Binary Tree #LeetCode75              

37/75             

#Python #DSA #100DaysOfCode #LeetCode

Binary Tree - DFS Count Good Nodes in Binary Tree #LeetCode75 36/75 #Python #DSA #100DaysOfCode #LeetCode

Priyansh0310's tweet image. Binary Tree - DFS    
Count Good Nodes in Binary Tree #LeetCode75            

36/75           

#Python #DSA #100DaysOfCode #LeetCode
Priyansh0310's tweet image. Binary Tree - DFS    
Count Good Nodes in Binary Tree #LeetCode75            

36/75           

#Python #DSA #100DaysOfCode #LeetCode

Day #66 Update: - DevOps - Continuing on the Project - LeetCode: Two Coding Problems from Blind 75 #100DaysOfCode #CodinChallenge #leetcode75 #LeetCode #DSA

_Tharun_G's tweet image. Day #66 Update:
- DevOps - Continuing on the Project
- LeetCode: Two Coding Problems from Blind 75
#100DaysOfCode #CodinChallenge #leetcode75 #LeetCode #DSA

Linked List Question. Reverse Linked List #LeetCode75 32/75 #Python #DSA #100DaysOfCode #LeetCode

Priyansh0310's tweet image. Linked List Question.    
Reverse Linked List  #LeetCode75     

32/75   

#Python #DSA #100DaysOfCode #LeetCode
Priyansh0310's tweet image. Linked List Question.    
Reverse Linked List  #LeetCode75     

32/75   

#Python #DSA #100DaysOfCode #LeetCode

Day 9 of #LeetCode75 Solved 1679. Max Number of K-Sum Pairs Approach: Sort the array Use two pointers (start & end) If sum == k → count++ and move both Else adjust pointers accordingly Time: O(n log n) Space: O(1) #100DaysOfCode #LeetCode #DSA #ProblemSolving #Day8

ANNISH_SEN's tweet image. Day 9 of #LeetCode75 
Solved 1679. Max Number of K-Sum Pairs 

 Approach:

Sort the array

Use two pointers (start &amp;amp; end)

If sum == k → count++ and move both

Else adjust pointers accordingly

Time: O(n log n)
Space: O(1)

#100DaysOfCode #LeetCode #DSA #ProblemSolving #Day8

Binary Tree - DFS Lowest Common Ancestor of a Binary Tree #LeetCode75 38/75 #Python #DSA #100DaysOfCode #LeetCode

Priyansh0310's tweet image. Binary Tree - DFS     
Lowest Common Ancestor of a Binary Tree #LeetCode75                

38/75               

#Python #DSA #100DaysOfCode #LeetCode
Priyansh0310's tweet image. Binary Tree - DFS     
Lowest Common Ancestor of a Binary Tree #LeetCode75                

38/75               

#Python #DSA #100DaysOfCode #LeetCode

Day 24 of #LeetCode75 Problem:104.Maximum Depth of Binary Tree Idea: Depth = 1+max(depth of left, depth of right). Base case→if root is NULL, return 0. Time:O(n) Space: O(h)(stack space) #LeetCode #75DaysChallenge #Day24 #DSA #BinaryTree #Recursion #CPlusPlus #CodingJourney

ANNISH_SEN's tweet image. Day 24 of #LeetCode75
 Problem:104.Maximum Depth of Binary Tree 
 Idea:
Depth = 1+max(depth of left, depth of right).
Base case→if root is NULL, return 0.
Time:O(n)
Space: O(h)(stack space)
#LeetCode #75DaysChallenge #Day24 #DSA #BinaryTree #Recursion #CPlusPlus #CodingJourney
ANNISH_SEN's tweet image. Day 24 of #LeetCode75
 Problem:104.Maximum Depth of Binary Tree 
 Idea:
Depth = 1+max(depth of left, depth of right).
Base case→if root is NULL, return 0.
Time:O(n)
Space: O(h)(stack space)
#LeetCode #75DaysChallenge #Day24 #DSA #BinaryTree #Recursion #CPlusPlus #CodingJourney

🗓️ Day 1 of LeetCode75 Problem: 1768. Merge Strings Alternately 🔑 Idea: Use max(len1, len2) and merge character by character. Append leftovers at the end. ⏱️ Time: O(n) | Space: O(1) extra ✅ First step toward finishing #LeetCode75 in <75 days! 🚀 #100DaysOfCode #DSA #LeetCode

ANNISH_SEN's tweet image. 🗓️ Day 1 of LeetCode75
Problem: 1768. Merge Strings Alternately
🔑 Idea: Use max(len1, len2) and merge character by character. Append leftovers at the end.
⏱️ Time: O(n) | Space: O(1) extra
✅ First step toward finishing #LeetCode75 in &amp;lt;75 days! 🚀
#100DaysOfCode #DSA #LeetCode

🗓️ Day 2 of #LeetCode75 Problem: 1431. Kids With the Greatest Number of Candies Time: O(n) Space: O(n) #LeetCode75 #100DaysOfCode #DSA #LeetCode

ANNISH_SEN's tweet image. 🗓️ Day 2 of #LeetCode75
Problem: 1431. Kids With the Greatest Number of Candies 
        Time: O(n) 
        Space: O(n)
#LeetCode75 #100DaysOfCode #DSA #LeetCode
ANNISH_SEN's tweet image. 🗓️ Day 2 of #LeetCode75
Problem: 1431. Kids With the Greatest Number of Candies 
        Time: O(n) 
        Space: O(n)
#LeetCode75 #100DaysOfCode #DSA #LeetCode

Day 23 of #LeetCode75 Problem:328.Odd Even Linked List Idea: 1.Separate nodes into odd and even positions. 2.Connect odd nodes first, then even. Time:O(n) Space:O(1) Sometimes,you’ve to reorder to keep the chain organized. #LeetCode #75DaysChallenge #Day23 #DSA #LinkedList

ANNISH_SEN's tweet image. Day 23 of #LeetCode75
Problem:328.Odd Even Linked List
 Idea:
1.Separate nodes into odd and even positions.
2.Connect odd nodes first, then even. 
Time:O(n)
Space:O(1)
Sometimes,you’ve to reorder to keep the chain organized.
#LeetCode #75DaysChallenge #Day23 #DSA #LinkedList
ANNISH_SEN's tweet image. Day 23 of #LeetCode75
Problem:328.Odd Even Linked List
 Idea:
1.Separate nodes into odd and even positions.
2.Connect odd nodes first, then even. 
Time:O(n)
Space:O(1)
Sometimes,you’ve to reorder to keep the chain organized.
#LeetCode #75DaysChallenge #Day23 #DSA #LinkedList

Day 3 of LeetCode 75 Problem: 605. Can Place Flowers 🔑 Idea: 1.Check each plot. 2.A flower can be planted only if previous, current, and next are all empty. 3.Greedily place flowers and count. 4.If count ≥ n → return true. ⏱️ TC: O(n) | SC: O(1) #DSA #LeetCode #LeetCode75

ANNISH_SEN's tweet image. Day 3 of LeetCode 75
Problem: 605. Can Place Flowers 
🔑 Idea:

1.Check each plot.
2.A flower can be planted only if previous, current, and next are all empty.
3.Greedily place flowers and count.
4.If count ≥ n → return true.

⏱️ TC: O(n) | SC: O(1)
 #DSA #LeetCode #LeetCode75
ANNISH_SEN's tweet image. Day 3 of LeetCode 75
Problem: 605. Can Place Flowers 
🔑 Idea:

1.Check each plot.
2.A flower can be planted only if previous, current, and next are all empty.
3.Greedily place flowers and count.
4.If count ≥ n → return true.

⏱️ TC: O(n) | SC: O(1)
 #DSA #LeetCode #LeetCode75

Day 13 of #LeetCode75 Solved 1493. Longest Subarray of 1's After Deleting One Element Approach: Sliding Window / 2 Pointers Track consecutive 1’s with at most one deletion Update max length as we move Time: O(n) Space: O(1) #100DaysOfCode #LeetCode #DSA #ProblemSolving

ANNISH_SEN's tweet image. Day 13 of #LeetCode75 
Solved 1493. Longest Subarray of 1&apos;s After Deleting One Element 

 Approach:

Sliding Window / 2 Pointers

Track consecutive 1’s with at most one deletion

Update max length as we move

Time: O(n)
Space: O(1)

#100DaysOfCode #LeetCode #DSA #ProblemSolving
ANNISH_SEN's tweet image. Day 13 of #LeetCode75 
Solved 1493. Longest Subarray of 1&apos;s After Deleting One Element 

 Approach:

Sliding Window / 2 Pointers

Track consecutive 1’s with at most one deletion

Update max length as we move

Time: O(n)
Space: O(1)

#100DaysOfCode #LeetCode #DSA #ProblemSolving

Day 32 Of #leetcode75 Problem :450.delete node in a binary search tree. #LeetCode #75DaysChallenge #Day31 #BinaryTree #BFS #DSA #CPl

ANNISH_SEN's tweet image. Day 32 Of #leetcode75
Problem :450.delete node in a binary search tree. 

#LeetCode #75DaysChallenge #Day31 #BinaryTree #BFS #DSA #CPl
ANNISH_SEN's tweet image. Day 32 Of #leetcode75
Problem :450.delete node in a binary search tree. 

#LeetCode #75DaysChallenge #Day31 #BinaryTree #BFS #DSA #CPl

Day 30 of #LeetCode75 Problem: 199 Approach: Use DFS. traverse the right subtree first, then the left. If we enter a new level for the first time, record that node’s value. Time:O(n) Space:O(h) #LeetCode #75DaysChallenge #Day30 #DSA #BinaryTree #CodingJourney #KeepLearning

ANNISH_SEN's tweet image. Day 30 of #LeetCode75
 Problem: 199
Approach:
Use DFS.
traverse the right subtree first, then the left.
If we enter a new level for the first time, record that node’s value.

Time:O(n)
 Space:O(h)

#LeetCode #75DaysChallenge #Day30 #DSA #BinaryTree #CodingJourney #KeepLearning
ANNISH_SEN's tweet image. Day 30 of #LeetCode75
 Problem: 199
Approach:
Use DFS.
traverse the right subtree first, then the left.
If we enter a new level for the first time, record that node’s value.

Time:O(n)
 Space:O(h)

#LeetCode #75DaysChallenge #Day30 #DSA #BinaryTree #CodingJourney #KeepLearning

Loading...

Something went wrong.


Something went wrong.


United States Trends