Activate fountain problem. Twitter Online Assessment (OA) 2021 | Activate Fountain

Discussion in 'active' started by Yozshunris , Wednesday, February 23, 2022 2:16:18 PM.

  1. Makasa

    Makasa

    Messages:
    22
    Likes Received:
    16
    Trophy Points:
    6
    Traverse dp[] array. Thanks: — Rohit Mane. Python3 program to implement. That's why you update count by one to increase the number of required fountains. Interested in Coding Ninjas Flagship Courses? Explanation: The sprinkler 1 meter away from the start has a range of 2which means that it can cover everywhere from -1 meter to 3 meter, which covers the entirety of the garden.
    Subscribe to RSS - Activate fountain problem. Count minimum number of fountains to be activated to cover the entire garden
     
  2. Tarr

    Tarr

    Messages:
    749
    Likes Received:
    32
    Trophy Points:
    7
    Follow the steps below to solve the problem: traverse the array and for every array index, i.e. ith fountain, find the leftmost fountain up.Max i - a[i], 0 .
    Activate fountain problem. 88일차 - Activate Fountain
     
  3. Faeran

    Faeran

    Messages:
    569
    Likes Received:
    6
    Trophy Points:
    3
    forum? To solve this problem for range {i,j}, we have to options: [1] consider fountain at jth location, count this fountain as 1 and then minimized problem is {i, j.In beginning, all the fountains are switched off.
     
  4. Meztihn

    Meztihn

    Messages:
    615
    Likes Received:
    31
    Trophy Points:
    2
    Find minimum no. of fountains needed to be activated so that whole garden is covered. filmha2.online n=3 and a={1,2,1} then second fountain has.There is a one-dimensional garden of length N.
     
  5. Mezijar

    Mezijar

    Messages:
    987
    Likes Received:
    33
    Trophy Points:
    5
    Return the minimum number of taps that should be open to water the whole garden, If the garden cannot be watered return This is a greedy algorithm problem.Since we place it on jth location, we consider jth left coverage and skip that range.
     
  6. Vujas

    Vujas

    Messages:
    382
    Likes Received:
    7
    Trophy Points:
    2
    Twitter Online Assessment (OA) | Activate Fountain. There is a one-dimensional garden of length n - 1 meters. Every 1 meter there is a sprinkler.Note: 1.Forum Activate fountain problem
    Activate fountain problem.
     
  7. Brazshura

    Brazshura

    Messages:
    236
    Likes Received:
    5
    Trophy Points:
    3
    Your task is to find the minimum number of fountains that have to be activated such that the whole garden from position 0 to 'N' has access.Active Oldest Votes.
     
  8. Kajikree

    Kajikree

    Messages:
    535
    Likes Received:
    17
    Trophy Points:
    1
    Fountainsare installed at every position along a one-dimensional garden of length n, Array locations[] represents the coverage limit of these fountains.Result The minimum amount of sprinklers needed to cover the entirety of the garden.
    Activate fountain problem.
     
  9. Kazikasa

    Kazikasa

    Messages:
    208
    Likes Received:
    21
    Trophy Points:
    1
    While we think our assessments of the problems with issue coverage are plausible, contextual factors that activate cynicism in the presence of conflict?Improving the first-time asker experience - What was asking your first
     
  10. Kigajind

    Kigajind

    Messages:
    612
    Likes Received:
    4
    Trophy Points:
    6
    Stores index of next fountain.
     
  11. Masar

    Masar

    Messages:
    474
    Likes Received:
    25
    Trophy Points:
    3
    In order to save water, you want to turn on the least amount of sprinklers while still having everywhere in the garden be covered by at least one sprinkler.
     
  12. Nektilar

    Nektilar

    Messages:
    689
    Likes Received:
    28
    Trophy Points:
    6
    Bipul
     
  13. Daigami

    Daigami

    Messages:
    850
    Likes Received:
    27
    Trophy Points:
    7
    What's New.
     
  14. Zut

    Zut

    Messages:
    973
    Likes Received:
    4
    Trophy Points:
    2
    Show 5 replies.
     
  15. Akinokree

    Akinokree

    Messages:
    225
    Likes Received:
    12
    Trophy Points:
    5
    Thanks for answering.
     
  16. Taugrel

    Taugrel

    Messages:
    422
    Likes Received:
    14
    Trophy Points:
    4
    Rhea Rhea 1 1 1 bronze badge.
     
  17. Mezikree

    Mezikree

    Messages:
    514
    Likes Received:
    32
    Trophy Points:
    5
    Apply NOW.
     
  18. Mohn

    Mohn

    Messages:
    819
    Likes Received:
    26
    Trophy Points:
    7
    Rest all is correct.
     
  19. Tojara

    Tojara

    Messages:
    587
    Likes Received:
    23
    Trophy Points:
    1
    forum? Connect and share knowledge within a single location that is structured and easy to search.
     
  20. Arataur

    Arataur

    Messages:
    361
    Likes Received:
    19
    Trophy Points:
    2
    forum? Explanation: The sprinkler 1 meter away from the start has a range of 2which means that it can cover everywhere from -1 meter to 3 meter, which covers the entirety of the garden.
     
  21. Tojagul

    Tojagul

    Messages:
    684
    Likes Received:
    32
    Trophy Points:
    0
    Thanks for answering.
     
  22. Zugore

    Zugore

    Messages:
    550
    Likes Received:
    7
    Trophy Points:
    1
    What's New.
     
  23. Shakajind

    Shakajind

    Messages:
    933
    Likes Received:
    12
    Trophy Points:
    1
    Easy Normal Medium Hard Expert.
     
  24. Mikakasa

    Mikakasa

    Messages:
    855
    Likes Received:
    19
    Trophy Points:
    2
    In each position of the N length garden, a fountain has been installed.
     
  25. Mizilkree

    Mizilkree

    Messages:
    401
    Likes Received:
    11
    Trophy Points:
    0
    Udayan Agrawal Udayan Agrawal 71 1 1 gold badge 1 1 silver badge 3 3 bronze badges.
     
  26. Tagor

    Tagor

    Messages:
    154
    Likes Received:
    12
    Trophy Points:
    1
    Note : You do not need to print anything, it has already been taken care of.
     

Link Thread