Posty z #pythonDSA

#pythonDSA

Publiczne posty w X, które używają #pythonDSA.

Powiązane hashtagi

  1. Bhumi Pandey@BhumiPandey06
    LeetCode 54 – Spiral Matrix Solved: Return all elements of a matrix in spiral order Used boundaries: top, bottom, left, right Moved layer by layer inward while collecting elements Great for mastering 2D traversal logic! #100DaysOfCode #LeetCode #PythonDSA #MatrixProblems
    5018372
  2. Bhumi Pandey@BhumiPandey06
    LeetCode 704 – Binary Search Solved: Classic binary search on sorted array Kept adjusting low, high till target found or not Time complexity: O(log n) Foundations of efficient search algorithms! #LeetCode #PythonDSA #100DaysOfCode #BinarySearch
    0011138
  3. Bhumi Pandey@BhumiPandey06
    LeetCode 242 – Valid Anagram Solved: Check if two strings are anagrams Used frequency counting (hashmap) to compare characters. Sorted method works too, but hashmap = more efficient. A neat test of clean string logic! #LeetCode #PythonDSA #LearnInPublic
    00325
  4. Bhumi Pandey@BhumiPandey06
    LeetCode 1089 – Duplicate Zeros Solved: Duplicate each zero in the array in-place, shifting elements right Used two passes: Count how many zeros can be duplicated Fill from the back using reverse two-pointer Great for tricky in-place logic! #LeetCode #PythonDSA #ArrayProblems
    009159
  5. Bhumi Pandey@BhumiPandey06
    LeetCode 75 – Sort Colors Solved: Sort an array of 0s, 1s, and 2s in-place Used Dutch National Flag Algorithm Three pointers to sort in one pass → O(n) time, O(1) space Loved how elegant & efficient this approach is! #LeetCode #PythonDSA #SortingAlgorithms
    00326
  6. Bhumi Pandey@BhumiPandey06
    LeetCode 1021 – Remove Outermost Parentheses Solved: Remove outermost parentheses of every primitive group Used a counter to track depth Built result only when depth > 1 Great practice for stack logic without stack! #LeetCode #PythonDSA #ParenthesesProblem
    00429
  7. Bhumi Pandey@BhumiPandey06
    LeetCode 53 – Maximum Subarray Solved: Find the subarray with the maximum sum Applied Kadane’s Algorithm Track running sum, reset if it drops below 0 Time: O(n), Space: O(1) Perfect to build prefix thinking & subarray mastery! #PythonDSA #LeetCode #Kadane #LearnInPublic
    10423
  8. Bhumi Pandey@BhumiPandey06
    LeetCode 31 – Next Permutation Solved: Rearrange array to next lexicographically greater permutation Found dip,swapped with next greater,then reversed suffix Tricky but powerful for mastering permutations Classic problem with smart inplace logic! #LeetCode #PythonDSA #TwoPointers
    00433
  9. Bhumi Pandey@BhumiPandey06
    LeetCode 219 – Contains Duplicate II Solved: Check if duplicate exists within k distance Used a hashmap to store last seen index Compared i - prev_index <= k for match Perfect use of sliding window + hashing combo! #LeetCode #PythonDSA #HashMapLogic
    00756
  10. Bhumi Pandey@BhumiPandey06
    LeetCode 414 – Third Maximum Number Solved: Find the 3rd distinct max number in the array Used a set to track unique values Handled edge case: return max if < 3 distinct numbers Cleans up logic around max tracking & uniqueness! #LeetCode #PythonDSA #ArrayProblems
    00428
  11. Bhumi Pandey@BhumiPandey06
    LeetCode 1299 – Replace Elements with Greatest on Right Solved: Replace each element with the greatest on its right Traversed from right to left, tracked max so far O(n) time, O(1) space — clean in-place solution! Nice reverse traversal practice #LeetCode #PythonDSA #ArrayLogic
    00319
  12. Bhumi Pandey@BhumiPandey06
    LeetCode 724 – Find Pivot Index Solved: Find index where left sum = right sum Calculated total sum, then used running left sum If left == total - left - current, it’s the pivot Great intro to prefix sum logic! #LeetCode #PythonDSA #PrefixSum
    00320
  13. Bhumi Pandey@BhumiPandey06
    LeetCode 35 – Search Insert Position Solved: Find the index to insert target in sorted array Binary Search approach → O(log n) If found, return index. If not, return where it should be inserted. Clean & classic binary search twist! #PythonDSA #LeetCode #BinarySearch
    00326
  14. Bhumi Pandey@BhumiPandey06
    LeetCode 1614 – Maximum Nesting Depth of Parentheses Solved: Find max depth of nested parentheses Traverse string, increment on '(',decrement on ')' Track maximum depth reached O(n) time, O(1)space Simple yet useful stack-like logic! #LeetCode #100DaysOfCode #PythonDSA #Strings
    10657
  15. Bhumi Pandey@BhumiPandey06
    LeetCode 15 – 3Sum Solved: Find all unique triplets that sum to 0 Sorted the array + used two pointers inside a loop Handled duplicates carefully to avoid repeat triplets A solid test of logic, edge cases & efficiency! #LeetCode #PythonDSA #TwoPointers
    00652
  16. Pokaż więcej postów