Biweekly-66 (27th Nov, 2021)

  1. 2085. Count Common Words With One Occurrence

    Hint 1 Use hashmap (Counter)

  2. 2086. Minimum Number of Buckets Required to Collect Rainwater from Houses"

    Hint 1 First put the bucket at best place and the remove those covering home.
    Hint 2 Answer is (best bucket cnt + remaining house).
    Hint 3 Corner case: check for each house is coverable

  3. 2087. Minimum Cost Homecoming of a Robot in a Grid

    Hint djikstra will fail. why ?
    Hint Too many cells to cover (10**10). Think of something else
    Hint To reach home, which path you need to take ? (cost is non-negative)
    Hint To reach home, number of rows and number of cols changes are fixed.

  4. 2088. Count Fertile Pyramids in a Land

    Hint Deconstruct pyramid into smaller part and then think to calculate how many pyramids are there
    Hint we can calculate left and right perpendiculars and then construct pyramids from them
    Hint calculate for normal and flipped version of grid

Weekly-269 (28th Nov, 2021)

  1. 2089. Find Target Indices After Sorting Array
    Hint Implementation
  2. 2090. K Radius Subarray Averages
    Hint Prefix sum
  3. 2091. Removing Minimum and Maximum From Array
    Hint Greedy cases to minimize number of remove
    Hint min(r+1, n-l, l+1+(n-r)). here l and r are index of max and min elements (l < r).
  4. 2092. Find All People With Secret
    Hint sort by time and try to share secret
    Hint at current timestamp, find connected components and color all nodes if one of them have seen secret