Vamsi Pavan’s Place

When curiousity outbursts …..

There is an array A[N] of N numbers. You have to compose an array Output[N] such that Output[i] will be equal to multiplication of all the elements of A[N] except A[i]. For example Output[0] will be multiplication of A[1] to A[N-1] and Output[1] will be multiplication of A[0] and from A[2] to A[N-1].

June 18th, 2008 · 1 Comment · Algorithms, Google

Solve it without division operator and in O(n).

Bookmark it! These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Live
  • StumbleUpon
  • BlinkList
  • YahooMyWeb
  • NewsVine
  • blogtercimlap
  • Netvouz
  • Technorati
  • Slashdot
  • Print this article!

Tags: ·

1 response so far ↓

  • 1 Pa1 // Jun 25, 2008 at 5:30 pm

    With Division operator, this would be a piece of cake…

    Pa1

Leave a Comment