Posty z #pythonDSA

#pythonDSA

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

Powiązane hashtagi

  1. 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
  2. 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
  3. 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
  4. 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
  5. 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
  6. 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
  7. Bhumi Pandey@BhumiPandey06
    LeetCode 540 – Single Element in a Sorted Array Find element that appears once in sorted array Binary search with index parity logic Pairs start at even index before single element Shift search space based on mid’s pairing O(log n) time, O(1) space #BinarySearch #DSA #PythonDSA
    00857
  8. 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
  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 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
  11. Bhumi Pandey@BhumiPandey06
    Contains Duplicate Problem: Check if any value appears at least twice in the array. Sounds simple, but it’s a great warm-up for understanding hashing. Explored: Brute: O(n²) – nested loops Optimal: O(n) – used set() to track seen values #LeetCode #PythonDSA #AkshaySaini
    00424
  12. 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
  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 125 – Valid Palindrome Solved: Check if a string is a valid palindrome (ignore cases & non-alphanumerics) Cleaned string using regex + .lower() Two-pointer check from both ends Classic string + pointer logic! #LeetCode #PythonDSA #StringProblems #DSA
    00418
  15. Bhumi Pandey@BhumiPandey06
    LeetCode 151 – Reverse Words Task: Reverse the order of words, not characters. Input: " hello world " → Output: "world hello" Used: split(), reverse(), join() Focus: Clean strings, trim spaces, reverse logic. #LeetCode #PythonDSA #StringManipulation #LearnInPublic
    00424
  16. Pokaż więcej postów