LC contest problems summary
[Biweekly-66 (27th Nov, 2021)](https://leetcode.com/contest/biweekly-contest-66/)
Use hashmap (Counter)
2086. Minimum Number of Buckets Required to Collect Rainwater from Houses" First put the bucket at best place and the remove those covering home. Answer is (best bucket cnt + remaining house). Corner case: check for each house is coverable
2087. Minimum Cost Homecoming of a Robot in a Grid djikstra will fail. why ? Too many cells to cover (10**10). Think of something else To reach home, which path you need to take ? (cost is non-negative) To reach home, number of rows and number of cols changes are fixed.
2088. Count Fertile Pyramids in a Land Deconstruct pyramid into smaller part and then think to calculate how many pyramids are there we can calculate left and right perpendiculars and then construct pyramids from them calculate for normal and flipped version of grid
[Weekly-269 (28th Nov, 2021)](https://leetcode.com/contest/weekly-contest-269)
- 2089. Find Target Indices After Sorting Array Implementation
- 2090. K Radius Subarray Averages Prefix sum
- 2091. Removing Minimum and Maximum From Array Greedy cases to minimize number of remove min(r+1, n-l, l+1+(n-r)). here l and r are index of max and min elements (l < r).
- 2092. Find All People With Secret sort by time and try to share secret at current timestamp, find connected components and color all nodes if one of them have seen secret