LeetCode Daily Challenge-904. Fruit Into Baskets(Python, Med, O(n))
Sliding window+Hashmap, Optimal Python Solution | TC O(n) SC O(1)

Search for a command to run...
Articles tagged with #leetcodedaily
Sliding window+Hashmap, Optimal Python Solution | TC O(n) SC O(1)

Problem Description LeetCode 2044: Count Number of Maximum Bitwise-OR Subsets Given an integer array nums, we need to: Find the maximum possible bitwise OR of any subset of nums Return the count of different non-empty subsets that achieve this max...

Problem Description LeetCode 2210 asks us to count the number of hills and valleys in an array. A hill is an element that is strictly greater than its neighbors, while a valley is an element that is strictly smaller than its neighbors. The key challe...

Problem Understanding LeetCode 1948-Delete Duplicate Folders in System The goal is to delete all duplicate folder subtrees. Two folders are considered duplicates if they have the same structure and folder names in their subtrees. Solution 1: Standa...

TC O(n log n) SC O(n) using minHeap, maxHeap and DP

Find subsequence where (nums[i] + nums[i+1]) % k is the same for all pairs
