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 941 – Valid Mountain Array Solved: Check if the array forms a valid mountain shape Strictly increasing, then strictly decreasing Used two-pointer climb + descent logic Edge cases = key here Great mix of condition checks & pointer flow! #LeetCode #PythonDSA #ArrayProblems
    00430
  3. Bhumi Pandey@BhumiPandey06
    LeetCode 81 – Search in Rotated Sorted Array II Solved: Like LC33 but with duplicates Modified Binary Search Skip duplicates if nums[left] == nums[mid] == nums[right] Still O(log n) in best case, O(n) worst case due to duplicates #LeetCode #100DaysOfCode #PythonDSA #BinarySearch
    00551
  4. Bhumi Pandey@BhumiPandey06
    LeetCode 1283 – Find the Smallest Divisor Given a Threshold Find the smallest divisor so that sum of [num/div]≤threshold Used binary search on divisor range[1…max(nums)] For each mid, compute sum If sum-threshold:increase divisor Else:shrink search space #LeetCode #PythonDSA
    00739
  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 706 – Design HashMap Solved: Implement a basic HashMap from scratch Used array of buckets + handled collisions with chaining (lists) Implemented put(), get(), and remove() Great practice for building core data structures! #LeetCode #PythonDSA #basics
    00439
  7. Bhumi Pandey@BhumiPandey06
    LeetCode 705 – Design HashSet Solved: Build a basic HashSet from scratch Implemented with a list of buckets (chaining method) Covered add(), remove(), contains() Solid intro to DS design & hashing logic #LeetCode #DataStructures #PythonDSA #HashSet
    10464
  8. 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
  9. Bhumi Pandey@BhumiPandey06
    LeetCode 49 – Group Anagrams Solved: Group strings that are anagrams of each other Used hashmap with sorted string as key Collected anagrams into lists based on character signature. Great use of hashmaps + sorting combo! #LeetCode #PythonDSA #HashMap #LearnInPublic
    00430
  10. 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
  11. 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
  12. Bhumi Pandey@BhumiPandey06
    LeetCode 1295 – Find Numbers with Even Number of Digits Solved: Count how many numbers in the array have even digits Used len(str(num)) % 2 == 0 to check digit count Clean loop, simple condition — perfect warm-up! #LeetCode #PythonDSA #ArrayProblems
    009180
  13. Bhumi Pandey@BhumiPandey06
    LeetCode 796 – Rotate String Solved: Check if one string is rotation of another Trick: s2 must be a substring of s1 + s1 Simple check with in operator O(n²) worst-case, O(1) extra space Neat and elegant string trick! #LeetCode #100DaysOfCode #PythonDSA #Strings #DSA
    00534
  14. 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
  15. Bhumi Pandey@BhumiPandey06
    LeetCode 1051 – Height Checker Solved: Count students not in the correct height order Compared original array with its sorted version Counted mismatched positions Simple but highlights sorting + comparison logic! #LeetCode #PythonDSA #SortingProblems
    00317
  16. 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
  17. Pokaż więcej postów