Skip to main content

Answer (12)

  1. Find Square Root
    • For large multimplication, one number must be long long and the variable which store the result also be long long(ex: long long m = (long long)val * val)
  2. Find Nth Root
    • pow(mid, n) works here
  3. Koko Eating Banans
  4. Bouquets
    • low = min(bloomDay)
    • high = max(bloomDay)
    • Can we make m bouquets on day = mid?
    • Count consecutive bloomed flowers (bloomDay[i] <= mid)
      • When count == k → 1 bouquet formed
  5. Smallest Divisor
  6. Capacity to Ship
  7. Kth Missing Positive Number
  8. Aggresive Cows
  9. Book Allocation
  10. Split array - Largest Sum
  11. Painter's partition
  12. Minimize Max Distance to Gas Station
  13. Median of 2 sorted arrays
  14. Kth element of 2 sorted arrays