Skip to content
python hub, python-hub.com, pythonhub
  • Home
  • Basics
  • Intermediate
  • OOP
  • Advanced
  • Projects
  • Quizes
  • CTk GUI
  • About Us
  • Toggle website search
Press Escape to close the search panel.
Menu Close
  • Home
  • Basics
  • Intermediate
  • OOP
  • Advanced
  • Projects
  • Quizes
  • CTk GUI
  • About Us
  • Toggle website search

.

Let's Face DSA

643. Maximum Average Subarray I – Solution [Brute-Force to Best]

Here’s the question link on LeetCode 643. Maximum Average Subarray I: https://leetcode.com/problems/maximum-average-subarray-i/description Brute Force O(n × k)Optimal O(n) – Sliding Window Brute Force O(n × k) The straightforward approach is…

0 Comments
November 15, 2026
Let's Face DSA

1. Two Sum – Solution [Brute-Force to Best]

Here’s the question link on LeetCode 1. Two Sum: https://leetcode.com/problems/two-sum/description Brute Force O(n²)Better O(n log n) – Sorting + Two PointersOptimal O(n) – Hash Map Brute Force O(n²) The simplest…

0 Comments
November 14, 2026
Let's Face DSA

42. Trapping Rain Water – Solution [Brute-Force to Best]

Here’s the question link on LeetCode 42. Trapping Rain Water: https://leetcode.com/problems/trapping-rain-water/description Brute Force O(n²)Better O(n)Another Approach: Monotonic Stack O(n)Optimal O(n) Brute Force O(n²) For every index, I need to figure…

0 Comments
November 13, 2026
Let's Face DSA

189. Rotate Array – Solution [Brute-Force to Best]

Here’s the question link on LeetCode 189. Rotate Array: https://leetcode.com/problems/rotate-array/description Brute Force O(n × k)Better O(n)Optimal O(n) and O(1) SpaceCode lines explained Brute Force O(n × k) The simplest way…

0 Comments
November 12, 2026
Let's Face DSA

54. Spiral Matrix – Solution [Brute-Force to Best]

Here’s the question link on LeetCode 54. Spiral Matrix: https://leetcode.com/problems/spiral-matrix/description Brute Force [Space - O(m × n)]Optimal [Space - O(1)] Brute Force [Space - O(m × n)] My first thought…

0 Comments
November 11, 2026
  • Go to the previous page
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • …
  • 64
  • Go to the next page
Press Escape to close the search panel.

Categories

Recent Posts

  • 1347. Minimum Number of Steps to Make Two Strings Anagram – Solution [Brute-Force to Best]
  • 38. Count and Say – Solution [Brute-Force to Best]
  • 242. Valid Anagram – Solution [Brute-Force to Best]
  • 459. Repeated Substring Pattern – Solution [Brute-Force to Best]
  • Home – python-hub
  • Contact Us
  • Privacy Policy
  • About Us
  • Projects
  • Basics
  • Quick Ref
  • CTk
  • Intermediate
  • Python GUI
  • OOP
  • Quizes
  • Advanced
  • Challenges
  • CodeCraft
  • Flutter
  • Tech Tool Spotlight
Copyright © - python-hub.com All Rights Reserved