Welcome to DSA Panicle!¶
Table of Content¶
Array & String
Array & String
- Sliding Window
- Fixed Window
- Naïve Sum/Average
- Max Sum Subarray of size K (Easy)
- 643. Maximum Average Subarray I (Easy)
- 1343. Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold (Medium)
- 2090. K Radius Subarray Averages (Medium)
- 1423. Maximum Points You Can Obtain from Cards (Medium)
- 1176. Diet Plan Performance (Easy)
- 1052. Grumpy Bookstore Owner (Medium)
- 1652. Defuse the Bomb (Easy)
- Hashmap
- Hashmap - Duplicate Elements
- Hashmap - Unique/Distinct Elements
- 1876. Substrings of Size Three with Distinct Characters (Easy)
- 1852. Distinct Numbers in Each Subarray (Medium)
- 2107. Number of Unique Flavors After Sharing K Candies (Medium)
- 1100. Find K-Length Substrings With No Repeated Characters (Medium)
- Substrings of length k with k-1 distinct elements (Medium)
- Hashmap - Anagrams/Permutations
- Count
- Count - Math
- Count - Swaps
- Heap
- Sorting
- Bit Manipulation
- Miscellaneous
- Naïve Sum/Average
- Longest Sub{string,array}
- Shortest Sub{string,array}
- Return Count,Indices
- Prospect
- Naive Sum/Average
- Longest Substring | Depends on
prev
- Less Than K (using
atMost
) - Exactly K (using
atMost
)- 1248. Count Number of Nice Subarrays (Medium)
- 992. Subarrays with K Different Integers (Hard)
- 930. Binary Subarrays With Sum (Medium)
- 1358. Number of Substrings Containing All Three Characters (Medium)
- 2799. Count Complete Subarrays in an Array (Medium)
- 2743. Count Substrings Without Repeating Character (Medium)
- Exactly K (without
atMost
)
- TODO’s
- Tips
- Visualize me!
- Fixed Window
- One Pass
- Two Pointers
Linked List
Search & Sort
Search & Sort
- Binary Search
- O(logN) , O(sort)
- Secondary loop BS
- Monotone Function, O(NlogN)
- Split Input Array
- 1011. Capacity To Ship Packages Within D Days (Medium)
- 410. Split Array Largest Sum (Hard)
- 875. Koko Eating Bananas (Medium)
- 1482. Minimum Number of Days to Make m Bouquets (Medium)
- 1231. Divide Chocolate (Hard)
- 774. Minimize Max Distance to Gas Station (Hard)
- 1891. Cutting Ribbons (Medium)
- 2226. Maximum Candies Allocated to K Children (Medium)
- 2064. Minimized Maximum of Products Distributed to Any Store (Medium)
- https://leetcode.com/problems/minimized-maximum-of-products-distributed-to-any-store/discuss/1563739/JavaC%2B%2BPython-Binary-Search
- 2137. Pour Water Between Buckets to Make Water Levels Equal (Medium)
- 2387. Median of a Row Wise Sorted Matrix (Medium)
- Kth Smallest
- Split Input Array
Tree
Tree
- Binary Tree
- N-ary Tree
- Binary Search Tree
Design & Simulation
Dynamic Programming
Maths & Bits
Maths & Bits
- Bit Manipulation
- Foundational Techniques
- Negating Bits in a Number
- Determining if the Least Significant Bit (LSB) is Set (Odd/Even Numbers)
- Unsetting the Least Significant (Rightmost) Set (1) Bit - Brian Kerninghan’s Algorithm
- Get/Isolate the Least Significant (Rightmost) Set (1) Bit
- Reverse Bits of a Given 32 Bits Unsigned Integer
- Swapping Two Variables
- Trivial Ops
- 476. Number Complement (Easy)
- 1009. Complement of Base 10 Integer (Easy)
- 190. Reverse Bits (Easy)
- 1486. XOR Operation in an Array (Easy)
- 1720. Decode XORed Array (Easy)
- 2433. Find The Original Array of Prefix Xor (Medium)
- 1829. Maximum XOR for Each Query (Medium)
- 2932. Maximum Strong Pair XOR I (Easy)
- Count 1-Bits
- 191. Number of 1 Bits (Easy)
- 2595. Number of Even and Odd Bits (Easy)
- 2859. Sum of Values at Indices With K Set Bits (Easy)
- 1356. Sort Integers by The Number of 1 Bits (Easy)
- 2657. Find the Prefix Common Array of Two Arrays (Medium)
- 461. Hamming Distance (Easy)
- 2220. Minimum Bit Flips to Convert Number (Easy)
- 2997. Minimum Number of Operations to Make Array XOR Equal to K (Medium)
- 1318. Minimum Flips to Make a OR b Equal to c (Medium)
- TODO - 477. Total Hamming Distance (Medium)
- LS 1-Bit
- LSB - Loop
- XOR - Cancel Bits
- Bitmask - Palindrome
- Bitmask - Log2
- Bitmask
- 448. Find All Numbers Disappeared in an Array (Easy)
- 442. Find All Duplicates in an Array (Medium)
- 2206. Divide Array Into Equal Pairs (Easy)
- 2869. Minimum Operations to Collect Elements (Easy)
- 1684. Count the Number of Consistent Strings (Easy)
- 2351. First Letter to Appear Twice (Easy)
- 2032. Two Out of Three (Easy)
- 645. Set Mismatch (Easy)
- Bit by Bit Loop
- Advanced
- Foundational Techniques
- Math