algorithm analysis

Discussion in 'Engineering Concepts' started by rahul roy, May 4, 2010.

  1. rahul roy

    rahul roy Banned

    Joined:
    May 4, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    1.There are n persons of different heights standing in a row, and A be an array storing their heights : A stores height of ith man in the row. For each person, we want to determine the person taller to him standing nearest to him in the row. How will you do so in O(n) time in total.
    Is it possible ? Then what it is ? Guess. :nonod:
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice